[MG] has started this page to list some problems he's been having trying to switch to Tile/Ttk widgets in an app using Tk 8.5. All of the development I'm doing is on Windows XP with a "Classic" Windows look, and I'm hoping someone might be able to help me out with a few of the problems... My latest hurdle is trying to get coloured buttons. In classic Tk, this is a case of doing: button .b -background red In Tile, I've tried things along the lines of ttk::button .b 1 % ttk::style configure TButton -background red 2 % ttk::style configure TButton.Button -background red 3 % ttk::style configure TButton.Button.label -background red ... and so on. Number 1 there has some effect, but not the desired one - I just get a red border around the outside of the button. 2 and 3 (and all kinds of variations, based on the layout elements returned by ''ttk::style layout TButton'') have no effect. But, if I do #1 and then switch to a different theme from my default (xpnative): ttk::setTheme clam The button changes to a Clam button - and it's red! Now, someone has shown me in the past how I can hack bits out of the clamTheme.tcl file before to basically steal their button for my theme, but that's not hugely helpful - the whole reason I'm trying to switch to Tile is for properly ''native'' widgets, and (while the Clam button is a very attractive shape), it's definately not native. (Ironically, on Windows with the Classic look, my red Tk [button] looks totally native, but I'd like to do this so it works cross-platform, and even on my Win XP system with the "Classic" look turned off, regular Tk [button]s stick out.) So, my question: is there a way to actually get a ''native'' looking button, in the color of my choice, no matter the theme I'm using? Or would I be better just admitting defeat here, and sticking with a regular old Tk button, and hoping noone notices that it's different from all the other buttons in my app? This has been driving me mad on and off for months, so any help someone in the know could offer would be greatly appreciated. Thanks for your time. [Martyn Smith] Have you tried looking at http://www.tkdocs.com/tutorial/styles.html which explains exactly what you are trying to do and how to do it. You could also look at the tcl files as part of tile which define the toolbutton style. button .b -style Toolbutton Don't forget changing the TButton style changes ALL your buttons. [MG] I have (it's basically my first stop when I'm having issues with Ttk, now), but I couldn't find anything there that actually worked on Windows. The problem I'm having isn't that I can't define a style to change the ''-background'' option for my button, it's that the option doesn't actually change the color of the button on Windows, just a border around it. For other themes (or other options, like -foreground) it works just as I'd expect. For instance, taking one of the examples from that page (colors changed just to make it a bit more visually distinct): ttk::style map TButton \ -background [list disabled green active red] \ -foreground [list disabled blue] \ -relief [list {pressed !disabled} sunken] \ pack [ttk::button .btn -text "Example"] .btn state disabled Then I change the theme to clam: ttk::setTheme clam and repeat the ''ttk::style map ...''. This is how the two different buttons look: [http://www.talvo.com/misc/tile-btn-problem.png] What I'm trying to do is get a native looking button like the first, but with a proper green background like the clam button has. There must be something, somewhere, setting the button's color to grey (well, SystemButtonFace), but the -background option is referring to a different element of the widget. (Given the difference between this and other Tk/Ttk widgets' use of -background, and of -border options, I would go so far as to say the ''wrong'' element of the widget.) [Martyn Smith] I tried this out on my XPSP3 with 'crystalxp' and it appears that the xpnative uses windows built in button i.e. Not drawn buttons, TK buttons are drawn using a graphics layer, this means that xpnative, ie OS native buttons are defined by the system (mine are apparently curved bitmap style buttons), I believe that this is the same for TTK bitmap themes like smog or plastik which tile bitmaps for the buttons. I think you will have to find another UI design/analogy for the coloured buttons or maybe design a theme based on a drawn theme using the standard 'system' colours from windows. ---- !!!!!! %| [Tile] |% !!!!!!