|
From: Joe E. <jen...@fl...> - 2006-04-03 08:19:50
|
Paul Walton wrote:
> Is there a way to change the focus ring to something different? For
> instance, a solid blue ring? I'm working on a theme that doesn't look right
> with the default dashed focus ring, so for now I've taken the ring out of
> all the buttons, but I'd like to implement a more appropiate focus indicator
> for this theme. Is there any way to do it?
Probably. What theme is yours based on?
The "highlight" element from the "classic" theme might do what
you want -- it just calls Tk_DrawFocusHighlight() with values
derived from the -highlightthickness and -highlightcolor
element options.
You can import it into your theme with:
style element create highlight from classic
and use it like:
style layout TButton {
TButton.highlight -children { ... }
}
style default TButton -highlightthickness 1
style map TButton -highlightcolor \
[list focus $accentColor {} $frameColor]
You could also change border colors (this is how
the 'clam' theme draws the focus ring for entry widgets,
for instance). How to do this depends on which border
element you're using.
--JE
|