Changeset 3305 for branches/nanovis2/gui/scripts/combobox.tcl
- Timestamp:
- Feb 18, 2013, 2:32:14 PM (12 years ago)
- Location:
- branches/nanovis2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nanovis2
- Property svn:mergeinfo changed
/trunk merged: 3174,3177-3182,3184-3199,3275-3282,3285,3287
- Property svn:mergeinfo changed
-
branches/nanovis2/gui/scripts/combobox.tcl
r1929 r3305 10 10 # ====================================================================== 11 11 # AUTHOR: Michael McLennan, Purdue University 12 # Copyright (c) 2004-20 05 Purdue Research Foundation12 # Copyright (c) 2004-2012 HUBzero Foundation, LLC 13 13 # 14 14 # See the file "license.terms" for information on usage and … … 36 36 itk_option define -disabledbackground disabledBackground DisabledBackground "" 37 37 itk_option define -disabledforeground disabledForeground DisabledForeground "" 38 itk_option define -interactcommand interactCommand InteractCommand "" 38 39 39 40 constructor {args} { # defined below } … … 152 153 itcl::body Rappture::Combobox::translate {value {defValue ""}} { 153 154 foreach {val label} [choices get -both] { 154 if {$label ==$value} {155 if {$label eq $value} { 155 156 return $val 156 157 } … … 181 182 set raw [$itk_component(entry) get] 182 183 set value [translate $raw "badValue"] 183 if { $value !="badValue" } {184 if { $value ne "badValue" } { 184 185 return $value 185 186 } … … 218 219 if {$itk_option(-editable) && $itk_option(-state) == "normal"} { 219 220 event generate $itk_component(hull) <<Value>> 221 if {[string length $itk_option(-interactcommand)] > 0} { 222 uplevel #0 $itk_option(-interactcommand) 223 } 220 224 } 221 225 } … … 262 266 } 263 267 select { 264 set val [$itk_component(ddlist) current -label] 265 if {"" != $val} { 266 value $val 268 set newval [$itk_component(ddlist) current -label] 269 set val [$itk_component(entry) get] 270 if {$newval ne "" && $newval ne $val} { 271 value $newval 272 if {[string length $itk_option(-interactcommand)] > 0} { 273 uplevel #0 $itk_option(-interactcommand) 274 } 267 275 } 268 276 }
Note: See TracChangeset
for help on using the changeset viewer.