Ignore:
Timestamp:
Sep 20, 2012 12:46:32 PM (12 years ago)
Author:
ldelgass
Message:

sync with trunk

Location:
branches/nanovis2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/nanovis2

  • branches/nanovis2/gui/scripts/textentry.tcl

    r2744 r3175  
    3737    itk_option define -height height Height 0
    3838
    39     constructor {owner path args} { # defined below }
     39    constructor {owner path args} {
     40        # defined below
     41    }
    4042
    4143    public method value {args}
     
    254256                    -foreground $itk_option(-textforeground)
    255257
    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> \
    257261                    [itcl::code $this _newValue]
    258                 bind $itk_component(entry) <Control-KeyPress-a> \
     262                bind textentry <Control-KeyPress-a> \
    259263                    "[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
    260267
    261268                itk_component add emenu {
     
    309316                $itk_component(scrollbars) contents $itk_component(text)
    310317
    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> \
    312321                    [itcl::code $this _newValue]
    313                 bind $itk_component(text) <Control-KeyPress-a> \
     322                bind textentry <Control-KeyPress-a> \
    314323                    "[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
    315327
    316328                itk_component add tmenu {
Note: See TracChangeset for help on using the changeset viewer.