From: jmc on
Hello,

In Tcl/Tk 8.5.8 (Windows XP), I'm trying to manage a labelframe with
the window manager (the same way as for a frame) so that it becomes a
top-level window :

package require Tk
frame .one - width 100 -height 100 -bg red
labelframe .two -width 150 - height 150 -bg blue

wm manage .one => the widget appears on screen as a top-level
window
wm manage .two => the widget doesn't appear on screen

I don't understand why in the last line the labelframe doesn't appear
on screen.

Can somebody explain my mistake and explain how to make a labelframe
a top-level window ?

Many thanks
From: Koen Danckaert on
jmc wrote:
> Hello,
>
> In Tcl/Tk 8.5.8 (Windows XP), I'm trying to manage a labelframe with
> the window manager (the same way as for a frame) so that it becomes a
> top-level window :
>
> package require Tk
> frame .one - width 100 -height 100 -bg red
> labelframe .two -width 150 - height 150 -bg blue
>
> wm manage .one => the widget appears on screen as a top-level
> window
> wm manage .two => the widget doesn't appear on screen
>
> I don't understand why in the last line the labelframe doesn't appear
> on screen.
>
> Can somebody explain my mistake and explain how to make a labelframe
> a top-level window ?
>
> Many thanks

Try this:

wm manage .two
wm deiconify .two
raise .two

Koen
From: jmc on
On 22 fév, 18:42, Koen Danckaert <k...(a)spam.spam> wrote:
> jmc wrote:
> > Hello,
>
> > In Tcl/Tk 8.5.8 (Windows XP), I'm trying to manage a labelframe with
> > the window manager (the same way as for a frame) so that it becomes a
> > top-level window :
>
> > package require Tk
> > frame .one - width 100 -height 100 -bg red
> > labelframe .two -width 150 - height 150 -bg blue
>
> > wm manage .one         => the widget appears on screen as a top-level
> > window
> > wm manage .two        => the widget doesn't appear on screen
>
> > I don't understand why in the last line the labelframe doesn't appear
> > on screen.
>
> > Can somebody explain my mistake and explain how to make a labelframe
> > a  top-level window ?
>
> > Many thanks
>
> Try this:
>
>   wm manage .two
>   wm deiconify .two
>   raise .two
>
> Koen

Thanks a lot Koen, I tried your example and now it works for me.

Jean-Marie