|
From: Jeff H. <je...@Ac...> - 2005-09-26 17:45:44
|
Sori Schwimmer wrote:
> Didn't realised that Tile is a replacement for Tk, but
> now is clear. I need one more piece of advice though:
It is not a replacement, it is an ... addendum. It provides
themed replacements for most of the classic Tk widgets, along
with some new common controls, but the old ones will remain.
There are many cases where the classic controls still find
themselves more appropriate in a UI than a themed one.
> # let's manipulate the look of bt2:
> bt2.grid() # place it on the screen
> bt2.tk.call('style','map','-background {active
> #0000ff}') # to make it green
>
> Nothing happens on the screen. Any hint how should I
> proceed?
OK, the correct call would be:
bt2.tk.call('style', 'map', 'TButton',
'-background', '{active green}')
You require the named style, and in this case you want to
apply it to TButton (the class of the themed button). Note
that it really affects the background drawn, not the
highlight element.
--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos
|