Re: Can't manage ... it's a top-level window
- From: vnpenguin <vnpenguin@xxxxxxxxx>
- Date: Fri, 30 Nov 2007 12:25:20 -0800 (PST)
On Nov 30, 9:13 pm, Robert Heller <hel...@xxxxxxxxxxxx> wrote:
At Fri, 30 Nov 2007 11:59:11 -0800 (PST) vnpenguin <vnpeng...@xxxxxxxxx> wrote:
tk_optionMenu does NOT return the menubutton widget ($FR0.op1 /
$FR0.op2), but instead it returns the popup menu associated with the
menubutton widget. Bascially, you really cannot use the result of
tk_optionMenu the way you can use the result of normal widget creation
functions.
Try this code instead (which works with Tcl/Tk 8.4.7 under CentOS 4.5):
=========================================
set FR0 [ labelframe .fr0 -text "Test" ];
set lb1 [ label $FR0.name1 -text "Name:" ];
set op_menubut1 $FR0.op1
set op_menu1 [ tk_optionMenu $op_menubut1 v_op1 "A" "B" "C" ];
set lb2 [ label $FR0.name2 -text "Name2::" ];
set op_menubut2 $FR0.op2
set op_menu2 [ tk_optionMenu $op_menubut2 v_op2 "X" "Y" "Z" ];
grid $lb1 $op_menubut1 -row 1
grid $lb2 $op_menubut2 -row 2
pack $FR0
=========================================
Thank you so much ! it works well ;)
Regards,
.
- References:
- Re: Can't manage ... it's a top-level window
- From: Robert Heller
- Re: Can't manage ... it's a top-level window
- Prev by Date: Re: Can't manage ... it's a top-level window
- Previous by thread: Re: Can't manage ... it's a top-level window
- Next by thread: Re: Can't manage ... it's a top-level window
- Index(es):