Creating Python ttk gui is easy and has mostly appearance and appearance (win7). I have a little problem:
I would like to have a frame that looks like ttk.LabelFrame, but without a label. Just omitting the text option will leave an ugly gap.
Also I cannot get the ttk.Frame border to look like a LabelFrame. Is there an elegant way to do this? Bonus karma if it works on all / most versions of Windows above xp.
It may work with styles, but the LabelFrame style properties look mostly empty (style.element_options ("border.relief")). Maybe I'm looking in the wrong place.
edit:
try: # python 3 from tkinter import * # from ... import * is bad from tkinter.ttk import * except: from Tkinter import * from ttk import * t = Tcl().eval print("tcl version: " + str(t("info patchlevel"))) print("TkVersion: " + str(TkVersion)) root = Tk() lF = LabelFrame(root, text=None) lF.grid() b = Button(lF, text='gonzo') b.grid() f = Frame(root, relief="groove") #GROOVE) f.grid() b2 = Button(f, text='gonzo') b2.grid() f2 = Frame(root, relief=GROOVE, borderwidth=2) f2.grid() b3 = Button(f2, text='gonzo') b3.grid() mainloop()
output on win7 with freshly loaded python 3.2.3:
tcl version: 8.5.9
TkVersion: 8.5

Python 2.6.6 is also installed on this computer (same problem). Each installation seems to use the correct tk / tcl.
Gonzo source share