On 2010-03-08, at 7:16 PM, Swingle David-QWHM86 wrote: >>> So, what is the difference between widgets that have "ttk__" in their >>> name and those that don't? >> >> They're completely different widgets which use (or at least closely >> approximate) the theming of OS-native widgets. The first "t" >> stands for "tile" which is the extension that introduced >> them. As of Tk 8.5 the tile extension is integrated into the core. >> > So, both flavors are still referred to as Perl/Tkx?
Really it is all just core Tk in 8.5+, which Tkx binds too. If Perl/Tk were to update itself, it would get both as well. They are complementary widgets. The Ttk widgets tie strongly to native theming and drawing, while the classic Tk widgets are all owner (Tk) drawn and you get full control over them. A few classic Tk widgets (such as text and canvas) don't really have native equivalents and thus aren't in Ttk. >>> If I want to find help on these widgets, where do I look? >> >> Under the "Themed Widgets" section of the Tk documentation: >> >> http://docs.activestate.com/activetcl/8.5/tcl/tk_contents.htm > > But, if I look in the documentation, under "ttk_entry", for example, it > has "style" under "STANDARD OPTIONS", and if I click on "style" I'm > taken to a page where it says "standard options supported by widgets". > One of the many "standard options" is "-background" which "Specifies the > normal background color to use when displaying the widget". But, that > option doesn't work when creating an entry via "new_ttk__entry()". It > does work for an entry created via "new_entry()". Is there a list of > standard options that aren't supported for a given widget? You can assume that font and color control have been removed, except for the ttk::label widget. It is possible to use styles (see ttk_intro for basics) to modify the visuals of themed widgets. For the entry, this would work like: http://paste.tclers.tk/506 Also make sure to read http://www.tkdocs.com/tutorial/styles.html. > Mixing ttk and non-ttk widgets is ok? For example one has combo boxes > and the other has listboxes, and I want to use both. Yes, no problems. I recommend ttk where possible. The classic widgets still exist to support extra functionality that isn't available in x-platform widget sets for theming. >>> Why is there a difference and what are the advantages and >>> disadvantages to one over the other? >> >> The primary advantage is that it allows you to create Tk apps >> that look like native applications. Additionally, there are >> some widgets (like >> comboboxes) that are only available in ttk. One disadvantage >> is that they generally aren't as flexible if you want to set >> specific colors/fonts/etc. > > When you say "it allows...", are you referring to the themed widgets > (ttk)? Not sure what "native applications" means. I'm working in > Windows XP and I've yet to see a Perl/Tk, Perl/Tkx, ttk, or whatever the > name is, script that looks like a Windows XP app. Then you it's good enough that you don't notice. How about ppm? Some of the core changes: http://tktable.sourceforge.net/tile/screenshots/windowsxp.html and some PDK screenshots using Tkx on Windows: http://docs.activestate.com/pdk/8.2/PerlApp_gui.html#perlapp_gui_tabs http://docs.activestate.com/pdk/8.2/PerlCritic_gui.html Jeff