From: Will Duquette on
In the "clam" theme, the ttk::entry widget has a blue halo when it has
the focus. The ttk::combobox,
however, doesn't. It seems like they ought to work the same way.
Anybody know how to make
the ttk::combobox get the same blue outline when it has focus?
From: Joe English on
Will Duquette wrote:
>
> In the "clam" theme, the ttk::entry widget has a blue halo when it has
> the focus. The ttk::combobox,
> however, doesn't. It seems like they ought to work the same way.
> Anybody know how to make
> the ttk::combobox get the same blue outline when it has focus?


Clam theme border appearance is controlled by three options:
-bordercolor for the outer part, and -lightcolor and -darkcolor
for the two shadow colors.

The Entry widget has (ref: library/clamTheme.tcl):

ttk::style map TEntry \
-bordercolor [list focus $colors(-selectbg)] \
-lightcolor [list focus "#6f9dc6"] \
-darkcolor [list focus "#6f9dc6"] \
;
# where $colors(-selectbg) = #4a6984.

You could apply something similar to TCombobox to get
the same effect.

(FWIW, doing it this way doesn't look quite right to me,
and IIRC the XFCE GTk+ theme on which "clam" was patterned
didn't do it that way either.)



--Joe English

And to answer the inevitable next question: "See the source code"
From: Will Duquette on
On Jun 7, 10:02 am, Joe English <jengl...(a)fdip.bad-monkeys.com> wrote:
> Will Duquette wrote:
>
> > In the "clam" theme, the ttk::entry widget has a blue halo when it has
> > the focus.  The ttk::combobox,
> > however, doesn't.  It seems like they ought to work the same way.
> > Anybody know how to make
> > the ttk::combobox get the same blue outline when it has focus?
>
> Clam theme border appearance is controlled by three options:
> -bordercolor for the outer part, and -lightcolor and -darkcolor
> for the two shadow colors.
>
> The Entry widget has (ref: library/clamTheme.tcl):
>
>     ttk::style map TEntry \
>         -bordercolor    [list  focus $colors(-selectbg)] \
>         -lightcolor     [list  focus "#6f9dc6"] \
>         -darkcolor      [list  focus "#6f9dc6"] \
>         ;
>     # where $colors(-selectbg) = #4a6984.
>
> You could apply something similar to TCombobox to get
> the same effect.
>
> (FWIW, doing it this way doesn't look quite right to me,
> and IIRC the XFCE GTk+ theme on which "clam" was patterned
> didn't do it that way either.)
>
> --Joe English
>
>   And to answer the inevitable next question: "See the source code"

Thanks, Joe.

After I sent this I did some nosing around, and ultimately did
"apply something similar". You're right, it doesn't look quite like
the TEntry does; but it's OK for my purposes.

Thanks!

Will
 | 
Pages: 1
Prev: IPC options on Windows
Next: spinbox with 8.5.8