Juliano Freitas
www.gebrasil.hpg.com.br
------------------------------------------
Use o melhor sistema de busca da Internet
Radar UOL - http://www.radaruol.com.br
> I want a horizontal line to separate the frames in my tkinter
> aplication, how can i insert it????
Use a frame that's one dot tall:
>>> from Tkinter import *
>>> r=Tk()
>>> f=Frame(r,height=20,width=50,bg="green")
>>> f.pack()
>>> f=Frame(r,height=1,width=50,bg="black")
>>> f.pack()
>>> f=Frame(r,height=20,width=50,bg="yellow")
>>> f.pack()
Regards,
Matt
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