> -----Original Message-----
> From: Swingle David-QWHM86 
> Sent: Monday, March 08, 2010 11:14 PM
> To: 'Jeff Hobbs'; List"<[email protected]>"@il27exr01.cig.mot.com
> Subject: RE: Colors and other questions
> 
> > 
> > On 2010-03-08, at 6:46 PM, Michael Carman wrote:
> > 
> > > On 3/8/2010 7:28 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.
> > 
> > Mostly right, but a few modifications ...
> > 
> > Ttk stands for Themed Tk, representing the themed set of Tk 
> widgets.  
> > They actually do use the native theming APIs to draw the widgets on 
> > each platform.  'tile' is indeed the name of the original extension 
> > from which ttk is derived. See the intro at
> >    http://docs.activestate.com/activetcl/8.5/tcl/TkCmd/ttk_intro.htm
> > 
> The overview section in the link above stops in the middle of 
> a sentence.  Hopefully there isn't much more missing from the 
> section :)  And the intro is for tcl not Perl/tkx, so is 
> there a good way to translate?
> 
> So, in my particular case, I have several entry widgets, but 
> for 2 or 3 of them I want the background color to be red (or 
> some other color) if the entry is blank.  Is there a way to 
> change the background color of an individual ttk entry?
> 
> > >> 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
> > > 
> > >> 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.
> > 
> > and the reason for the latter is that native themes are meant to 
> > prevail.  You can modify them with styles (see top link).
> > 
> > Jeff
> > 
> > >> If tkx is supposed to be a thin wrapper over Tcl/Tk, does
> > that mean
> > >> there are different types of entry/button/radio widgets 
> in Tcl/Tk?
> > > 
> > > Yup.
> > > 
> > >> Any answers to the other questions from the previous post
> > (#2, 3, 4,
> > >> 7, 8, 9, 10)?
> > > 
> > > For 2-4 I don't know offhand. Check the Tk documentation
> > linked above.
> > > 
> > > #7 (fill when resizing) is probably the result of not 
> using -sticky 
> > > (when using the grid geometry manager) or -expand and -fill (when 
> > > using pack). Getting things to resize the way your used to 
> > > applications behaving takes practice.
> > > 
> > > For #8 (attaching scollbars to a listbox) I recommend using 
> > > Tkx::Scrolled. It's a mega-widget (so "yes" to #9) to make
> > it easy to
> > > add scrollbars to anything scrollable. Making a megawidget
> > isn't all
> > > that hard. Tkx includes LabelFrame as a simple demo. I've
> > made a few
> > > and put them on CPAN. (Tkx::Scrolled is on of them.)
> > > 
> > > For #10 (scrollbars after resizing) it sounds like programmatic 
> > > resizing isn't triggering the events to update 
> scrollbars. You may 
> > > need to do it explicitly. I'd have to dig through the code
> > to be sure.
> > > 
> > > -mjc
> > 
> > 

Reply via email to