grid

richard_chamberlain richard_chamberlain at ntlworld.com
Tue Jul 18 02:42:37 EDT 2000


Yes that looks fine.

You might want to either increase the ipad of the right frame or add a blank
label:

Label(right,text='',bg='orange').grid(row=1,column=0,columnspan=2)

so that your two frames are identically sized.

Try and get the hang of pack though, it's probably the most popular and
powerful of Tk's layout managers. I find that I use pack for 90% of my
layouts. But that maybe just me.

Oh and I think you spelt sweet wrong. </wink>

Richard

Keith Murphy <kpmurphy at my-deja.com> wrote in message
news:8kvome$9ah$1 at nnrp1.deja.com...
> does this look alright?
>
> # embed.py
> from Tkinter import *
>
> root = Tk()
>
> left = Frame(root, bg='red')
> right = Frame(root, bg='orange')
>
> button1 = Button(left, text='hi')
> button2 = Button(right, text='yo')
>
> entry1 = Entry(left)
> entry2 = Entry(right)
>
> label1 = Label(left, text='this is schweet')
>
> left.grid(row=0, column=0, ipadx=10, ipady=10)
> right.grid(row=0, column=1, ipadx=10, ipady=10)
> button1.grid(row=0, column=0)
> button2.grid(row=0, column=0)
> entry1.grid(row=0, column=1)
> entry2.grid(row=0, column=1)
> label1.grid(row=1, column=0, columnspan=2)
>
>
> mainloop()
> # end embed.py
>
>
> thanks,
> -->keith
>
> In article <8kvkvt$68h$1 at nnrp1.deja.com>,
>   Keith Murphy <kpmurphy at my-deja.com> wrote:
> > can you embed grids?  ...what i'd like to do is grid within several
> > frames, and then grid the frames together.  sort of like html
> tables...
> > i hate pack.
> >
> > -->keith
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list