Changeset 437 for trunk/gui/scripts/booleanentry.tcl
- Timestamp:
- May 13, 2006 1:13:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/booleanentry.tcl
r115 r437 15 15 itcl::class Rappture::BooleanEntry { 16 16 inherit itk::Widget 17 18 itk_option define -state state State "normal" 17 19 18 20 constructor {owner path args} { # defined below } … … 141 143 itcl::body Rappture::BooleanEntry::tooltip {} { 142 144 set str [$_owner xml get $_path.about.description] 143 append str "\n\n Enter a boolean value (1/0, on/off, yes/no, true/false)"145 append str "\n\nClick to turn on/off" 144 146 return [string trim $str] 145 147 } … … 154 156 event generate $itk_component(hull) <<Value>> 155 157 } 158 159 # ---------------------------------------------------------------------- 160 # CONFIGURATION OPTION: -state 161 # ---------------------------------------------------------------------- 162 itcl::configbody Rappture::BooleanEntry::state { 163 set valid {normal disabled} 164 if {[lsearch -exact $valid $itk_option(-state)] < 0} { 165 error "bad value \"$itk_option(-state)\": should be [join $valid {, }]" 166 } 167 $itk_component(switch) configure -state $itk_option(-state) 168 }
Note: See TracChangeset
for help on using the changeset viewer.