|
From: Joe E. <jen...@fl...> - 2005-09-25 04:00:58
|
Sori Schwimmer wrote:
>
> I installed recently Tiles, and found them an
> excellent idea - change consistently the look and feel
> of a whole application in only three lines of code.
> Then I stumbled over the following problem: sometime I
> want to overwrite the default theme's look and
> enforce, say, a yellow background on a label when
> using, say, the blue theme. Not always possible:
> Tkinter, Tix and Pmw label won't bulge, while BWidget
> labels will. Same for bg in entries - none will let me
> do it. Pmw is offering some bg themes for validating
> data or marking it read-only - it's not working
> anymore. Now, there is to much consistency.
>
> Everything takes the values given by the Tile theme.
> Is it possible to enforce Tile theme's graphical
> values only for defaults, and let the programmer
> change things at will? Or is it to late relative to
> where the package is going?
In most cases, the Tile widgets are actually much more
customizable than their core counterparts -- just not
through widget options.
As a rule of thumb, tile widgets only include the "essential"
options relating to the function of the widget, while everything
appearance-related is handled by the style. (Deciding which
options are "essential" and which aren't generally comes down
to a judgment call -- my tendency has been to leave options
out when in doubt.)
But each widget has a '-style' option that can be used to select
a custom style, by which nearly every aspect of the appearance
can be specified. The process of defining custom styles isn't
very well documented, but the Tcl'2004 presentation on Tile
is a good place to start:
<URL: http://tktable.sourceforge.net/tile/tile-tcl2004.pdf >
--Joe English
jen...@fl...
|