Changeset 3175 for branches/nanovis2/gui/scripts/textentry.tcl
- Timestamp:
- Sep 20, 2012 12:46:32 PM (12 years ago)
- Location:
- branches/nanovis2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nanovis2
-
branches/nanovis2/gui/scripts/textentry.tcl
r2744 r3175 37 37 itk_option define -height height Height 0 38 38 39 constructor {owner path args} { # defined below } 39 constructor {owner path args} { 40 # defined below 41 } 40 42 41 43 public method value {args} … … 254 256 -foreground $itk_option(-textforeground) 255 257 256 bind $itk_component(entry) <KeyPress> \ 258 # Make sure these event bindings occur after the class bindings. 259 # Otherwise you'll always get the entry value before the edit. 260 bind textentry <KeyPress> \ 257 261 [itcl::code $this _newValue] 258 bind $itk_component(entry)<Control-KeyPress-a> \262 bind textentry <Control-KeyPress-a> \ 259 263 "[list $itk_component(entry) selection range 0 end]; break" 264 set bindtags [bindtags $itk_component(entry)] 265 lappend bindtags textentry 266 bindtags $itk_component(entry) $bindtags 260 267 261 268 itk_component add emenu { … … 309 316 $itk_component(scrollbars) contents $itk_component(text) 310 317 311 bind $itk_component(text) <KeyPress> \ 318 # Make sure these event bindings occur after the class bindings. 319 # Otherwise you'll always get the text value before the edit. 320 bind textentry <KeyPress> \ 312 321 [itcl::code $this _newValue] 313 bind $itk_component(text)<Control-KeyPress-a> \322 bind textentry <Control-KeyPress-a> \ 314 323 "[list $itk_component(text) tag add sel 1.0 end]; break" 324 set bindtags [bindtags $itk_component(text)] 325 lappend bindtags textentry 326 bindtags $itk_component(text) $bindtags 315 327 316 328 itk_component add tmenu {
Note: See TracChangeset
for help on using the changeset viewer.