> > >>> 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. >
I guess I'm just easily confused. I had to go through hoops in order to get drag and drop to work in what I was calling Perl/Tkx (Can someone define/describe Perl/Tk, Perl/Tkx, Perl ttk, etc?). It was simple in what I thought was Perl/Tk ($frame->DropSite(-dropcommand => ..., -droptypes => ...)). If it is all just core Tk in 8.5+ (I'm using Perl v5.8.8, not sure what flavor of Tk comes with that) then why were there two totally different ways of doing drag and drop. And, if they are all just core Tk, why did one method work only in Perl/Tk and another work only in Perl/Tkx? > >>> 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. > I guess the tutorial is where I'll find a description of translating from tcl to perl/tkx. I've gone throught the tutorial, and think it is great, for both Perl and for Ruby. I guess I'll have to concentrate on the tcl parts. The first link is gibberish to me :), so hopefully once I understand the translation, the tcl will be more readable. Or, maybe if I looked earlier in the day. Is it possible to use styles to modify the visuals of individual widgets? > > 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 > Well, I guess I didn't express myself properly. The windows that get created in Perl/Tk, to me and to others, looks horrible. When I used some of the "ttk__" widgets, I was able to use "Tkx::style_theme_use()" and the window looked better. But, if I take "ttk__" out of all the calls, then the style_theme_use doesn't seem to have any affect. -- dss