Menu

#277 Default value of "-style" option

open
tile (215)
2
2007-10-23
2007-10-23
Joe English
No

(Prompted by query on clt):

If "-style" isn't specified, it defaults to the widget class (which in turn is given by the "-class" option, or, if that isn't specified, by a built-in default.)

So to determine the style used by a widget, you have to check [$w cget -style], and if that's the empty string, use [winfo class $w] instead.

This is suboptimal: Tile ought to default "-style" to the class name instead of "" (and, probably, "-class" too).

Discussion


Log in to post a comment.