Bwidget Source Code
Check-in [5747b2943a]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Patch [d439b24425] of ticket [75101bf5ce] localizes strings, adds option -help
Timelines: family | ancestors | descendants | both | patch-75101
Files: files | file ages | folders
SHA1: 5747b2943abcb5eb1dbe588ae7b48ab98c7a98b2
User & Date: oehhar 2013-06-25 12:38:50
Context
2013-07-03
08:16
Corrected de.rc line endings and converted no.rc to utf8 check-in: 84ff7343f7 user: oehhar tags: patch-75101
2013-06-25
12:38
Patch [d439b24425] of ticket [75101bf5ce] localizes strings, adds option -help check-in: 5747b2943a user: oehhar tags: patch-75101
2013-06-21
15:58
SelectColor widget enhancements: traceable variable, setable background, visual changes [patch75101] check-in: 6f1b04a125 user: oehhar tags: patch-75101
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
	traceable variable with current user color choice.
	New option -background and command SelectColor for
	window background.
	TitleFrames, Dynamic help and Aqua native buttons used.
	Show current choice by highlighting, not focus, to avoid
	conflict with keyboard traversal.
	Shows entry widget for numerical color input/output.
	
	Patch by K.J.Nash [Patch 75101]
	
2013-01-09 Harald Oehlmann <[email protected]>

	* widget.tcl: Bug fixed:
	Error 'invalid command name ".#BWidget.#ttk::entry"'
	arises in themed mode when an Entry widget should get
	focus by the tab key.






<
|







11
12
13
14
15
16
17

18
19
20
21
22
23
24
25
	traceable variable with current user color choice.
	New option -background and command SelectColor for
	window background.
	TitleFrames, Dynamic help and Aqua native buttons used.
	Show current choice by highlighting, not focus, to avoid
	conflict with keyboard traversal.
	Shows entry widget for numerical color input/output.

	Patch by Keith J. Nash [Patch 75101]
	
2013-01-09 Harald Oehlmann <[email protected]>

	* widget.tcl: Bug fixed:
	Error 'invalid command name ".#BWidget.#ttk::entry"'
	arises in themed mode when an Entry widget should get
	focus by the tab key.

Changes to color.tcl.

1
2
3
4
5
6
7

8
9
10
11
12
13
14
..
37
38
39
40
41
42
43

44
45
46
47
48
49
50
..
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
...
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
...
207
208
209
210
211
212
213

214
215
216
217
218
219
220
221
222
223
224
225
226


227
228
229
230
231
232
233
234
235
236
237
238
...
273
274
275
276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
291
292
...
320
321
322
323
324
325
326

327
328
329
330
331
332
333
334
...
401
402
403
404
405
406
407
408
409
410
411

412
413






414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453

454
455
456
457
458
459
460
...
720
721
722
723
724
725
726

727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747

748
749






750
751
752







753
754
755
756
757
758
759
...
824
825
826
827
828
829
830
831

832
833
834
835
836
837
838
...
860
861
862
863
864
865
866
867

868
869
870
871
872
873
874
...
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
namespace eval SelectColor {
    Widget::define SelectColor color Dialog

    Widget::declare SelectColor {
        {-title      String     "Select a color" 0}
        {-parent     String     ""               0}
        {-variable   String     ""               1}

        {-color      TkResource ""               0 {label -background}}
	{-type       Enum       "dialog"         1 {dialog popup}}
	{-placement  String     "center"         1}
        {-background TkResource ""               0 {label -background}}
    }

    variable _baseColors {
................................................................................
    variable _varName
    variable _unsavedSelection
    variable _oldColor
    variable _entryColor
    variable _bgColor
    variable _fgColor
    variable _rounds

}

proc SelectColor::create { path args } {
    Widget::init SelectColor $path $args

    set type [Widget::cget $path -type]

................................................................................
    set parent [winfo toplevel [winfo parent $top]]
    wm withdraw  $top
    wm transient $top $parent
    wm overrideredirect $top 1
    catch { wm attributes $top -topmost 1 }

    set _varName [Widget::cget $path -variable]
    if {[string range $_varName 0 1] ne {::}} {
        set _varName ::SelectColor::_unsavedSelection
    }

    set _bgColor  [Widget::cget $path -background]
    set _rounds   {}

    set frame [frame $top.frame \
................................................................................
	return [eval [list dialog $path] $args]
    } else {
	# The user has either selected one of the palette colors, or has
	# cancelled.  The full BWidget/native dialog was not called.
	# Unless the user has cancelled, record the selected
	# color in $_varName which may be traced by the caller.
	set tmpCol [lindex $colors $_selection]
	if {$tmpCol eq {}} {
	    # User has cancelled - no need to set $_varName
	} else {
	    set $_varName $tmpCol
	}
	return $tmpCol
    }
}
................................................................................
    variable _varName
    variable _unsavedSelection
    variable _oldColor
    variable _entryColor
    variable _bgColor
    variable _fgColor
    variable _rounds


    Widget::init SelectColor $path:SelectColor $args
    set top   [Dialog::create $path \
                   -title  [Widget::cget $path:SelectColor -title]  \
                   -parent [Widget::cget $path:SelectColor -parent] \
                   -separator 1 -default 0 -cancel 1 -anchor e]
    wm resizable $top 0 0
    set dlgf  [$top getframe]
    set fg    [frame $dlgf.fg]
    set desc  [list \
                   base _baseColors "Base colors" \
                   user _userColors "User colors"]



    # Initialize _varName
    # The initial value of [$w cget -variable] is ignored and is
    # overwritten with [$w cget -color].
    set _varName [Widget::cget $path:SelectColor -variable]
    if {[string range $_varName 0 1] ne {::}} {
        set _varName ::SelectColor::_unsavedSelection
    }

    # Initialize _bgColor and _rounds
    set _bgColor [Widget::cget $path:SelectColor -background]
    set _rounds  {}

................................................................................
                incr lin
                set  col 0
            }
        }
        pack $titf -anchor w -pady 2
    }

    # Record these colors for use later
    set _fgColor [$fg.round0 cget -highlightcolor]

    # Add a TitleFrame $titf to wrap $fg.round and $fg.value

    set titf  [TitleFrame $fg.choice -text {Your Selection}]
    set subf  [$titf getframe]
    pack $titf -anchor w -pady 2 -expand yes -fill both

    # Add an entry widget $fg.value for the #RRGGBB value
    if {$::tk_version > 8.4} {
	set fixedFont TkFixedFont
    } else {
	set fixedFont Courier
................................................................................
                    -highlightthickness 0 \
                    -relief flat -borderwidth 0]
    pack $fcolor -in $fround -fill y -expand yes
    pack $fround -in $subf -side right -anchor e -pady 2 -fill y -expand yes

    # Add a TitleFrame $dlgf.fd to wrap the canvas selectors.  The
    # labels are referenced by the DynamicHelp tooltip.

    set fd0 [TitleFrame $dlgf.fd -text {Color Selectors}]
    set fd  [$fd0 getframe]
    set f1  [frame $fd.f1 -relief sunken -borderwidth 2]
    set f2  [frame $fd.f2 -relief sunken -borderwidth 2]
    set c1  [canvas $f1.c -width 200 -height 200 -bd 0 -highlightthickness 0]
    set c2  [canvas $f2.c -width 15  -height 200 -bd 0 -highlightthickness 0]

    for {set val 0} {$val < 40} {incr val} {
................................................................................
    # From now on, this is the only way that:
    # (1) ::SelectColor::_SetEntryValue is called
    # (2) ::SelectColor::_entryColor is modified (except by the user typing in
    #     the entry widget)

    trace add variable $_varName write ::SelectColor::_SetEntryValue

    # Change case on button text
    $top add -text OK
    $top add -text Cancel


    # Add labels to offer DynamicHelp
    set blurb {Hover for help with color selection by:}






    frame $top.help
    label $top.help.0 -text $blurb       -relief flat   -bd 2
    label $top.help.1 -text { Mouse }    -relief groove -bd 2
    label $top.help.2 -text { Keyboard } -relief groove -bd 2
    pack  $top.help.0 $top.help.1 $top.help.2 \
            -anchor center -pady 4 -side left -padx 5
    DynamicHelp::add $top.help.1 -text [string map {{        } {}} \
        {Click or drag the mouse in the Color Selectors to choose a color.
        If the selected color remains black, regardless of what you
        do in the left-hand Color Selector (for hue and saturation), check
        the position of the pointer in the right-hand Color Selector
        (for brightness).

        Click one of the "Base colors" to read a value from this palette.

        Click one of the "User colors" to read a value from this palette,
        or to write to the palette if the color is blank.  If you then
        use the Color Selectors to change the color, your choice will be
        written to this (User) palette color until you select another
        (Base or User) palette color.}]
    DynamicHelp::add $top.help.2 -text [string map {{        } {}} \
        {Click in the text entry window in the left of the "Your
        Selection" area.

        Type the color that you want in hexadecimal RGB format.
        Whenever the number of hexadecimal digits is a multiple
        of 3, the color value is valid and will be copied to the
        other parts of the Color Selector.

        Leave the text entry window by clicking anywhere else,
        or by pressing the "Escape" or "Return" key.  The text
        entry window will then display the color in 24-bit RGB
        format, although internally the Color Selector uses
        48-bit colors.

        When the text entry widget does not have keyboard focus
        (i.e. does not show a cursor), the "Return" and "Escape"
        keys do the same as the "OK" and "Cancel" buttons,
        respectively.}]
    after idle [list pack $top.help]


    # Override background color
    ReColor $path $_bgColor

    set res [$top draw]
    if {$res == 0} {
        set color [$fg.color cget -background]
................................................................................
# Currently a "configure -background" command is passed to Dialog and Widget
# but does not change SelectColor.
# ------------------------------------------------------------------------------

proc SelectColor::ReColor {path newColor} {
    variable _bgColor
    variable _rounds


    set _bgColor $newColor

    $path:cmd configure -bg $_bgColor

    foreach child {
        .sep           .help           .frame          .bbox
        .help.0        .help.1         .help.2
        .frame.fd      .frame.fd.f.f1  .frame.fd.f.f2
        .frame.fg      .frame.fg.base  .frame.fg.choice
        .frame.fg.user .frame.fg.round .frame.fg.vround
    } {
        $path$child configure -bg $_bgColor
    }

    # Special treatment for Aqua native buttons.
    # FIXME implement a general fix for BWidget Button/ButtonBox/Dialog
    if {[tk windowingsystem] eq "aqua"} {
        foreach child {
            .bbox.b0
            .bbox.b1

        } {
            $path$child configure \






                    -highlightbackground $_bgColor \
                    -highlightthickness  0
        }







    }

    foreach fround $_rounds {
        $fround configure -highlightbackground $_bgColor -bg $_bgColor
    }
    
    return
................................................................................
# ------------------------------------------------------------------------------

proc SelectColor::_SetEntryValue {argVarName var2 op} {
    variable _entryColor
    variable _varName

    if {0} {
    } elseif {$argVarName eq $_varName && $var2 eq {} && $op eq "write"} {

        # OK
    } else {
        # Unexpected call
        return -code error "Unexpected trace of variable\
                \"$argVarName\", \"$var2\", \"$op\""
    }

................................................................................
# argument (the clicked window) is the Tk window path of somewhere else.  Then,
# the command removes focus from the entry widget to the default button.
# ------------------------------------------------------------------------------

proc SelectColor::_CheckFocus {w} {
    variable _widget

    if {($w ne $_widget(en)) && ([focus] eq $_widget(en))} {

        set top [winfo toplevel $_widget(en)]
        $top setfocus default
    }

    return
}

................................................................................
proc SelectColor::_ValidateColorEntry {percentV percentP} {
    variable _varName

    set result [regexp -- {^#[0-9a-fA-F]*$} $percentP]
    set lenny  [string length $percentP]

    if {$result} {
        if {$percentV eq "forced"} {
            # Validation only.  Don't want a loop.
        } elseif {($percentV eq "key")} {
            # Copy to GUI if a valid color.
            if {($lenny - 1) % 3 || $lenny == 1} {
                # Not a valid color, which needs 3n+1 characters, n > 0
            } else {
                after idle [list SelectColor::_SetWithoutTrace $percentP]
            }
        } elseif {($percentV eq "focusout")} {
            # If the color is valid it will already have been copied to the GUI
            # by the "key" validation above.
            #
            # The code below only needs to reset the value in the entry widget.
            # Remove an invalid value, convert a valid one to 24-bit.
            # Ignore $percentP, just fire the trace on $_varName.
            after idle [list set $_varName [set $_varName]]






>







 







>







 







|







 







|







 







>













>
>




|







 







|



>
|
|







 







>
|







 







<
|
|

>
|
|
>
>
>
>
>
>
|
|
|
|
|
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
>







 







>






|
<







|
<
<

<
<
>

|
>
>
>
>
>
>
|
|
<
>
>
>
>
>
>
>







 







|
>







 







|
>







 







|

|






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
...
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
...
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
...
408
409
410
411
412
413
414

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433













434


















435
436
437
438
439
440
441
442
443
...
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717

718
719
720
721
722
723
724
725


726


727
728
729
730
731
732
733
734
735
736
737

738
739
740
741
742
743
744
745
746
747
748
749
750
751
...
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
...
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
...
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
namespace eval SelectColor {
    Widget::define SelectColor color Dialog

    Widget::declare SelectColor {
        {-title      String     "Select a color" 0}
        {-parent     String     ""               0}
        {-variable   String     ""               1}
        {-help       Boolean    0                1}
        {-color      TkResource ""               0 {label -background}}
	{-type       Enum       "dialog"         1 {dialog popup}}
	{-placement  String     "center"         1}
        {-background TkResource ""               0 {label -background}}
    }

    variable _baseColors {
................................................................................
    variable _varName
    variable _unsavedSelection
    variable _oldColor
    variable _entryColor
    variable _bgColor
    variable _fgColor
    variable _rounds
    variable _help
}

proc SelectColor::create { path args } {
    Widget::init SelectColor $path $args

    set type [Widget::cget $path -type]

................................................................................
    set parent [winfo toplevel [winfo parent $top]]
    wm withdraw  $top
    wm transient $top $parent
    wm overrideredirect $top 1
    catch { wm attributes $top -topmost 1 }

    set _varName [Widget::cget $path -variable]
    if {! [string equal [string range $_varName 0 1] {::}]} {
        set _varName ::SelectColor::_unsavedSelection
    }

    set _bgColor  [Widget::cget $path -background]
    set _rounds   {}

    set frame [frame $top.frame \
................................................................................
	return [eval [list dialog $path] $args]
    } else {
	# The user has either selected one of the palette colors, or has
	# cancelled.  The full BWidget/native dialog was not called.
	# Unless the user has cancelled, record the selected
	# color in $_varName which may be traced by the caller.
	set tmpCol [lindex $colors $_selection]
	if {[string equal $tmpCol ""]} {
	    # User has cancelled - no need to set $_varName
	} else {
	    set $_varName $tmpCol
	}
	return $tmpCol
    }
}
................................................................................
    variable _varName
    variable _unsavedSelection
    variable _oldColor
    variable _entryColor
    variable _bgColor
    variable _fgColor
    variable _rounds
    variable _help

    Widget::init SelectColor $path:SelectColor $args
    set top   [Dialog::create $path \
                   -title  [Widget::cget $path:SelectColor -title]  \
                   -parent [Widget::cget $path:SelectColor -parent] \
                   -separator 1 -default 0 -cancel 1 -anchor e]
    wm resizable $top 0 0
    set dlgf  [$top getframe]
    set fg    [frame $dlgf.fg]
    set desc  [list \
                   base _baseColors "Base colors" \
                   user _userColors "User colors"]

    set _help [Widget::cget $path:SelectColor -help]

    # Initialize _varName
    # The initial value of [$w cget -variable] is ignored and is
    # overwritten with [$w cget -color].
    set _varName [Widget::cget $path:SelectColor -variable]
    if {! [string equal [string range $_varName 0 1] {::}]} {
        set _varName ::SelectColor::_unsavedSelection
    }

    # Initialize _bgColor and _rounds
    set _bgColor [Widget::cget $path:SelectColor -background]
    set _rounds  {}

................................................................................
                incr lin
                set  col 0
            }
        }
        pack $titf -anchor w -pady 2
    }

    # Record these colors for later use
    set _fgColor [$fg.round0 cget -highlightcolor]

    # Add a TitleFrame $titf to wrap $fg.round and $fg.value
    set name [lindex [BWidget::getname yourSelection] 0]
    set titf [TitleFrame $fg.choice -text $name]
    set subf [$titf getframe]
    pack $titf -anchor w -pady 2 -expand yes -fill both

    # Add an entry widget $fg.value for the #RRGGBB value
    if {$::tk_version > 8.4} {
	set fixedFont TkFixedFont
    } else {
	set fixedFont Courier
................................................................................
                    -highlightthickness 0 \
                    -relief flat -borderwidth 0]
    pack $fcolor -in $fround -fill y -expand yes
    pack $fround -in $subf -side right -anchor e -pady 2 -fill y -expand yes

    # Add a TitleFrame $dlgf.fd to wrap the canvas selectors.  The
    # labels are referenced by the DynamicHelp tooltip.
    set name [lindex [BWidget::getname colorSelectors] 0]
    set fd0 [TitleFrame $dlgf.fd -text $name]
    set fd  [$fd0 getframe]
    set f1  [frame $fd.f1 -relief sunken -borderwidth 2]
    set f2  [frame $fd.f2 -relief sunken -borderwidth 2]
    set c1  [canvas $f1.c -width 200 -height 200 -bd 0 -highlightthickness 0]
    set c2  [canvas $f2.c -width 15  -height 200 -bd 0 -highlightthickness 0]

    for {set val 0} {$val < 40} {incr val} {
................................................................................
    # From now on, this is the only way that:
    # (1) ::SelectColor::_SetEntryValue is called
    # (2) ::SelectColor::_entryColor is modified (except by the user typing in
    #     the entry widget)

    trace add variable $_varName write ::SelectColor::_SetEntryValue


    $top add -text [lindex [BWidget::getname ok] 0]
    $top add -text [lindex [BWidget::getname cancel] 0]

    if {$_help} {
        # Add labels to offer DynamicHelp
        set helpWords         [lindex [BWidget::getname hoverHelp] 0]
        set mouseWord       " [lindex [BWidget::getname mouseHelp] 0] "
        set keyboardWord    " [lindex [BWidget::getname keyboardHelp] 0] "
        set mouseHelpText     [lindex [BWidget::getname mouseHelpText] 0]
        set keyboardHelpText  [lindex [BWidget::getname keyboardHelpText] 0]
        set mouseHelpText     [subst -nocommands -novariables $mouseHelpText]
        set keyboardHelpText  [subst -nocommands -novariables $keyboardHelpText]
        frame $top.help
        label $top.help.0 -text $helpWords    -relief flat   -bd 2
        label $top.help.1 -text $mouseWord    -relief groove -bd 2
        label $top.help.2 -text $keyboardWord -relief groove -bd 2
        pack  $top.help.0 $top.help.1 $top.help.2 \
                -anchor center -pady 4 -side left -padx 5
        DynamicHelp::add $top.help.1 -text $mouseHelpText













        DynamicHelp::add $top.help.2 -text $keyboardHelpText


















        after idle [list pack $top.help]
    }

    # Override background color
    ReColor $path $_bgColor

    set res [$top draw]
    if {$res == 0} {
        set color [$fg.color cget -background]
................................................................................
# Currently a "configure -background" command is passed to Dialog and Widget
# but does not change SelectColor.
# ------------------------------------------------------------------------------

proc SelectColor::ReColor {path newColor} {
    variable _bgColor
    variable _rounds
    variable _help

    set _bgColor $newColor

    $path:cmd configure -bg $_bgColor

    foreach child {
        .sep           .frame          .bbox

        .frame.fd      .frame.fd.f.f1  .frame.fd.f.f2
        .frame.fg      .frame.fg.base  .frame.fg.choice
        .frame.fg.user .frame.fg.round .frame.fg.vround
    } {
        $path$child configure -bg $_bgColor
    }

    if {$_help} {


        foreach child {


            .help    .help.0    .help.1    .help.2
        } {
            $path$child configure -bg $_bgColor
        }
    }

    # Special treatment for Aqua native buttons.
    # FIXME implement a general fix for BWidget Button/ButtonBox/Dialog
    if {[string equal [tk windowingsystem] "aqua"]} {
        $path.bbox.b0 configure -highlightbackground $_bgColor \
                -highlightthickness 0

        $path.bbox.b1 configure -highlightbackground $_bgColor \
                -highlightthickness 0
    } else {
        $path.bbox.b0 configure -bg $_bgColor -activebackground $_bgColor \
                -highlightbackground $_bgColor
        $path.bbox.b1 configure -bg $_bgColor -activebackground $_bgColor \
                -highlightbackground $_bgColor
    }

    foreach fround $_rounds {
        $fround configure -highlightbackground $_bgColor -bg $_bgColor
    }
    
    return
................................................................................
# ------------------------------------------------------------------------------

proc SelectColor::_SetEntryValue {argVarName var2 op} {
    variable _entryColor
    variable _varName

    if {0} {
    } elseif {[string equal $argVarName $_varName] &&
            [string equal $var2 {}] && [string equal $op "write"]} {
        # OK
    } else {
        # Unexpected call
        return -code error "Unexpected trace of variable\
                \"$argVarName\", \"$var2\", \"$op\""
    }

................................................................................
# argument (the clicked window) is the Tk window path of somewhere else.  Then,
# the command removes focus from the entry widget to the default button.
# ------------------------------------------------------------------------------

proc SelectColor::_CheckFocus {w} {
    variable _widget

    if {    ! [string equal $w $_widget(en)] &&
            [string equal [focus]  $_widget(en)]} {
        set top [winfo toplevel $_widget(en)]
        $top setfocus default
    }

    return
}

................................................................................
proc SelectColor::_ValidateColorEntry {percentV percentP} {
    variable _varName

    set result [regexp -- {^#[0-9a-fA-F]*$} $percentP]
    set lenny  [string length $percentP]

    if {$result} {
        if {[string equal $percentV "forced"]} {
            # Validation only.  Don't want a loop.
        } elseif {[string equal $percentV "key"]} {
            # Copy to GUI if a valid color.
            if {($lenny - 1) % 3 || $lenny == 1} {
                # Not a valid color, which needs 3n+1 characters, n > 0
            } else {
                after idle [list SelectColor::_SetWithoutTrace $percentP]
            }
        } elseif {[string equal $percentV "focusout"]} {
            # If the color is valid it will already have been copied to the GUI
            # by the "key" validation above.
            #
            # The code below only needs to reset the value in the entry widget.
            # Remove an invalid value, convert a valid one to 24-bit.
            # Ignore $percentP, just fire the trace on $_varName.
            after idle [list set $_varName [set $_varName]]

Changes to lang/da.rc.

52
53
54
55
56
57
58












*PasswdDlg.title:  Indtast brugernavn og password

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors


















>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*PasswdDlg.title:  Indtast brugernavn og password

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/de.rc.

52
53
54
55
56
57
58














*PasswdDlg.title:  Enter login and password

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Grundfarben
*userColorsName: Benutzerdefinierte Farben




















>
>
>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
*PasswdDlg.title:  Enter login and password

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Grundfarben
*userColorsName: Benutzerdefinierte Farben

*yourSelectionName: Gewählte Farbe
*colorSelectorsName: Farbraum
*hoverHelpName: Ballonhilfe für Farbauswahl mit:
*mouseHelpName: Maus
*keyboardHelpName: Tastatur

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName:
Um eine Farbe zu wählen bitte im Farbraum und im Helligkeitsregler\nklicken oder ziehen. Bleibt die gewählte Farbe wieder erwarten schwarz,\nso muß die Helligkeit ganz rechts erhöht werden.\n\nMit einem Klick auf die Grundfarbenpalette kann diese gewählt werden.\n\nEin benutzerdefinierter Farbspeicher kann durch einen Klick selektiert\nwerden. Ab dann wird jede Farbveränderung auch in den Farbspeicher\n geschrieben.

*keyboardHelpTextName:
Aktivieren sie das Texteingabefenster mit einem Klick oder mit der\nTabulatortaste. Eine Farbe kann als RGB-Wert eingegeben mit 3 oder 6\nhexadezimalen Ziffern eingegeben werden.\n\nDie Eingabe kann mit der Escape- oder Eingabetaste abgeschlossen werden.\n\nAusserhalb des Eingabefensters wird der Dialog mit der Eingabetaste\nbestätigt und mit der Escapetaste zurückgenommen.

Changes to lang/en.rc.

52
53
54
55
56
57
58












*PasswdDlg.title:  Enter login and password

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors


















>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*PasswdDlg.title:  Enter login and password

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/es.rc.

52
53
54
55
56
57
58












*PasswdDlg.title:  Introduzca su nombre de usuario y contrasea

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors


















>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*PasswdDlg.title:  Introduzca su nombre de usuario y contrasea

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/fr.rc.

52
53
54
55
56
57
58












*PasswdDlg.title:  Entrez le login et le mot de passe

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors


















>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*PasswdDlg.title:  Entrez le login et le mot de passe

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/hu.rc.

53
54
55
56
57
58
59












*PasswdDlg.title:  Add meg a felhasználónevet és a jelszót


! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Alapszínek
*userColorsName: Felhasználói színek


















>
>
>
>
>
>
>
>
>
>
>
>
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
*PasswdDlg.title:  Add meg a felhasználónevet és a jelszót


! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Alapszínek
*userColorsName: Felhasználói színek

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/nl.rc.

52
53
54
55
56
57
58












*PasswdDlg.title:  Voer inlognaam en wachtwoord in

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors


















>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*PasswdDlg.title:  Voer inlognaam en wachtwoord in

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/no.rc.

52
53
54
55
56
57
58












*PasswdDlg.title:  Skriv inn logginn og passord

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors


















>
>
>
>
>
>
>
>
>
>
>
>
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
*PasswdDlg.title:  Skriv inn logginn og passord

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Base colors
*userColorsName: User colors

*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.

Changes to lang/pl.rc.

54
55
56
57
58
59
60













! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Kolory podstawowe
*userColorsName: Kolory niestandardowe



















>
>
>
>
>
>
>
>
>
>
>
>
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

! --- symbolic names of label of SelectColor dialog ----------------------------

*baseColorsName: Kolory podstawowe
*userColorsName: Kolory niestandardowe


*yourSelectionName: Your Selection
*colorSelectorsName: Color Selectors
*hoverHelpName: Hover for help with color selection by:
*mouseHelpName: Mouse
*keyboardHelpName: Keyboard

! --- dynamic help text for SelectColor dialog.  Lines 75 chars max, split by '\n'.

*mouseHelpTextName: Click or drag the mouse in the Color Selectors to choose a color.\nIf the selected color remains black, regardless of what you\ndo in the left-hand Color Selector (for hue and saturation), check\nthe position of the pointer in the right-hand Color Selector\n(for brightness).\n\nClick one of the "Base colors" to read a value from this palette.\n\nClick one of the "User colors" to read a value from this palette,\nor to write to the palette if the color is blank.  If you then\nuse the Color Selectors to change the color, your choice will be\nwritten to this (User) palette color until you select another\n(Base or User) palette color.

*keyboardHelpTextName: Click in the text entry window in the left of the "Your\nSelection" area.\n\nType the color that you want in hexadecimal RGB format.\nWhenever the number of hexadecimal digits is a multiple\nof 3, the color value is valid and will be copied to the\nother parts of the Color Selector.\n\nLeave the text entry window by clicking anywhere else,\nor by pressing the "Escape" or "Return" key.  The text\nentry window will then display the color in 24-bit RGB\nformat, although internally the Color Selector uses\n48-bit colors.\n\nWhen the text entry widget does not have keyboard focus\n(i.e. does not show a cursor), the "Return" and "Escape"\nkeys do the same as the "OK" and "Cancel" buttons,\nrespectively.