Posted to tcl by dburns at Mon Feb 08 20:10:10 GMT 2010view raw
- # [12:05]	jenglish	dburns - sure.
- # [12:05]	dburns	I'm busy trying to finish the TTK spt that tclguy started in GUIB, the now open-sourced
- # [12:06]	dburns	gui builder that was active-states....
- # [12:06]	dburns	I'm a ttk tyro, but I've gotten down and dirty on the details, and now have questions that can't be answered by the documentation
- # [12:06]	dburns	here's #1
- # [12:07]	dburns	Taking ttk::label for an example, "-font" seems to be a characteristic that is now controlled by the current theme, right?
- # [12:08]	dburns	and if I query "cget -font", I get "" back, indicating this. right?  (it doesn't say so in the docs)
- # [12:08]	dburns	(By "now controlled" I mean as opposed to the old Tk label widget)
- # [12:09]	jenglish	If you explicitly specify a "-font" on a widget that supports it, ([ttk::label], [ttk::entry] &c), that will take precedence.
- # [12:09]	jenglish	If the widget option is blank, it will pick it up from the style database.
- # [12:10]	dburns	Ok, but GUIB attempts to obtain the current font value by doing a cget, and a "" means "comes from the style database" if I here you correctly
- # [12:11]	jenglish	... and the value it gets from the style database will always be one of the standard Tk named fonts (TkDefaultFont, TkTextFont).
- # [12:11]	dburns	Now if my GUIB user sets it explicitly to "helvetica", and then wants to change it BACK to the TTk theme default, GUIB should set "" into "-font"
- # [12:11]	jenglish	Right.
- # [12:11]	dburns	Ok...here's the rub
- # [12:12]	dburns	For "-justify", a "cget -justify" on a TTk widget returns "" (which I interpreted as meaning the same thing)
- # [12:12]	dburns	but
- # [12:12]	dburns	when I try to set a "" (to indicate "take the theme default"), it is rejected as a valid value.  So now I'm thinking that -justify is not controlled by the theme..but again the docs don't say.
- # [12:13]	dburns	(Either the code or the docs should be changed, it seems to me)
- # [12:14]	jenglish	dburns: the rule is the same for all widget options: if it's specified on the widget, that value takes precedence.  Otherwise it's looked up from the style database.  If it's not found there, then a built-in default will be used.
- # [12:14]	dburns	My point is I cannot revert "-justify" by setting it to "" as I can with -font.  What's the scoop on this?
- # [12:15]	jenglish	hm.... though there are a few glitches.  In some cases [ttk::label -justify], [ttk::entry -font],  the only way to get an empty option value is to never set it.
-  
-  
- Further on, he adds:
- # [12:28]	jenglish	BTW, the aforementioned glitches are caused by 967209
-  
-