For Programmers: Free Programming Magazines  


Home > Archive > Tcl > December 2004 > Frame in Toplevel









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Frame in Toplevel
Binny V A

2004-12-31, 3:58 pm

Hello Everyone,

Can I pack a frame inside a Toplevel window? I can't get this
code to work.

toplevel .tops
frame .frm
pack .frm -in .tops

It shows an error "can't pack .frm in .tops"

I have used grid command also and got the same result.
Thanking You,
Binny V A
http://www.geocities.com/binnyva

Jeff Godfrey

2004-12-31, 3:58 pm


"Binny V A" <binnyva@hotmail.com> wrote in message
news:1104519220.874538.201220@c13g2000cwb.googlegroups.com...
> Hello Everyone,
>
> Can I pack a frame inside a Toplevel window? I can't get this
> code to work.
>
> toplevel .tops
> frame .frm
> pack .frm -in .tops
>
> It shows an error "can't pack .frm in .tops"



Sure you can, but the frame must first be a child of the *correct* toplevel
window. Try this:

toplevel .tops
frame .tops.frm
pack .tops.frm

Notice, that in this simple case, you don't even need the "-in" argument...


Jeff


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com