Iwidgets checkbox

package require Iwidgets
wm title . "Checkbox Example"

##
## wrap in a dialog user interaction
##
iwidgets::dialog .d \
 -title "Checkbox Example"

#.d hide Help
#.d hide Apply

.d buttonconfigure OK \
 -text "Update"

set cs [.d childsite]

##=========================================================
## Create a checkbox iwidget
##=========================================================
##
iwidgets::checkbox $cs.cb \
  -labeltext "Places Visited" \
  -labelpos n

set places [list australia england france germany spain hawaii tahiti]


foreach c [lsort $places] {

  $cs.cb add $c \
    -text [string totitle $c]
}

pack $cs.cb \
  -fill both \
  -expand false

.d activate

posted @ 2011-05-01 11:09  greencolor  阅读(156)  评论(0编辑  收藏  举报