Group: comp.lang.tcl


Subject: how to get a ttk::treeview with no border
From: Joe English
Date: 11/22/2007 4:19:52 PM
Bryan Oakley wrote: > I'm wanting a ttk::treeview with no border as I have it and its > scrollbar embedded inside another frame. I can't figure out how to get > rid of the border. > > I tried several variations of layouts, but even the simplest doesn't > seem to work (by that I mean I don't get errors but I still see the border) > > ttk::style layout FlatTree { > Treeview.client -sticky nswe > } > > Is that the proper approach or am I forgetting something? It looks like that ought to have some effect -- not necessarily the right effect, but it ought to do something -- did you remember to set [$tv configure -style FlatTree]? This should work: ttk::style configure Flat.Treeview -borderwidth 0 ... ttk::treeview $tv -style Flat.Treeview But, sigh, now that I look at it, only on X11 and maybe OSX; the XP and Windows field elements ignore -borderwidth. This will completely eliminate the border: ttk::style layout Flat.Treeview { Treeview.client } but it will eliminate other things as well (the "field" element is also responsible for erasing the background), and you'll probably need to change it for Tile 0.8 / Tk 8.5 (the name of the placeholder element has changed). --Joe English