From: Ivica I. B. <ic...@vt...> - 2009-05-18 04:11:23
|
Many thanks for all the help in this matter. Apologies for also cluttering the list with an apparently OT question--when I looked at the available tcl/tk mailing lists this one seemed closest to what I was hoping to ask. Best wishes, Ico > -----Original Message----- > From: Pat Thoyts [mailto:pat...@us...] > Sent: Sunday, May 17, 2009 12:12 PM > To: Ivica Ico Bukvic > Cc: tcl...@li... > Subject: Re: [TCLCORE] question about the default tcl/tk widget colors on > Linux > > Ivica Ico Bukvic <ic...@vt...> writes: > > >I am trying to alter the default background color of the "clam" theme. > >Since I was at first unable to figure out how to do this on the existing > >loaded theme, I decided to copy code found on the following page > >http://paste.tclers.tk/618 and change its color values. While this > >changes default background color of popup windows and scrollbars, it has > >apparently no effect on widgets such as menu and/or frame. I suspect > >this may be because menu and frame are not ttk-aware. If so, what would > >be the right way to do this? > > > >I also saw somewhere in code following statement: > > > >. configure -background "#ece7e3" > > > >This however has no effect either. > > > >Any help in this matter, particularly working example code, would be > >most appreciated! > > This list is for discussion of the language development. You should > make these requests to tcl comp.lang.tcl newsgroup. > > Only widgets in the ttk namespace are themed widgets. There is no > themed toplevel so the main window you get will not respond to theme > changes. > > Instead you should pack a ttk::frame into the main window and put > everything else in that. > ttk::frame .main > pack .main -fill both -expand 1 > > If you want to change the theme colour your code you should probably > define a new theme then use ttk::style theme use myclam > but > ttk::style configure . -background red > would change the default background for the current theme to red. > However it wouldn;t change things that have already been defined with > the original colour. So copy the clamTheme.tcl file and edit it to > generate a new custom version and load that > source myclamtheme.tcl > ttk::style theme use myclam > > -- > Pat Thoyts http://www.patthoyts.tk/ > PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD |