horizontal line in tkinter????
jepler at unpythonic.net
jepler at unpythonic.net
Mon Jul 15 18:45:53 EDT 2002
Another poster suggests using a frame which is 1 pixel tall and black.
The following looks a little more like a <HR> in HTML. A height of 2 gives
a pixel for the lighter color and for the darker color, and the padx/pady
leaves a gap on all sides in the color of the enclosing frame or toplevel.
I just translated this from some experimentation in wish, so the code is
only probably right...
def Separator(master):
return Frame(relief=ridge, height=2, bg="white")
def PackedSeparator(master, **pack_kw):
f = Separator(master)
f.pack(padx=5, pady=5, **pack_kw)
return f
def GriddedSeparator(master, **grid_kw):
f = Separator(master)
f.grid(padx=5, pady=5, **pack_kw)
return f
Jeff
More information about the Python-list
mailing list