Hello,
I created this menu from an example generated with
VisualTcl but there is a problem: I can't insert the menu
in the main window, I am obliged to create a new window (window2)
and to put the menu .window2.m61 in it.
I also don't want to use tools like "menubutton" or "iwidgets::menubar"
because they are not especially beautiful and don't look like other
Windows32 standards menus, unlike the one below.
Could someone help me please? I only would like to have one window with
the menu, not too!
#menuTest.tcl
#may, the 15th 2002
toplevel .window2 -class Toplevel -menu ".window2.m61"
wm minsize .window2 300 300
menu .window2.m61 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 1
.window2.m61 add cascade -menu ".window2.m61.men63" -label file
menu .window2.m61.men63 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 0
.window2.m61.men63 add cascade -menu ".window2.m61.men63.men64" -label {file cascade}
menu .window2.m61.men63.men64 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 0
.window2.m61.men63.men64 add command -command exit -label {exit 1}
.window2.m61.men63.men64 add command -command {#exit 2 command} -label {exit 2}
.window2.m61 add checkbutton -variable menuCheck -command exit -label {menu check}
.window2.m61 add cascade -menu ".window2.m61.men62" -label help
menu .window2.m61.men62 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 0
.window2.m61.men62 add command -command {#about 1 command} -label {about 1}
.window2.m61.men62 add command -command {#about 2 command} -label {about 2}
# ------- end of file here -----------------------------------------
Also, another question, when I mix a C program and a TCL script is there a way to hide
the "DOS" window that appears (I think it is tlc_init who launches the interpreter window)
and to keep only the GUI visible?
Thanks a lot for your answers!
Tiago
tiago251@netcourrier.com
I created this menu from an example generated with
VisualTcl but there is a problem: I can't insert the menu
in the main window, I am obliged to create a new window (window2)
and to put the menu .window2.m61 in it.
I also don't want to use tools like "menubutton" or "iwidgets::menubar"
because they are not especially beautiful and don't look like other
Windows32 standards menus, unlike the one below.
Could someone help me please? I only would like to have one window with
the menu, not too!
#menuTest.tcl
#may, the 15th 2002
toplevel .window2 -class Toplevel -menu ".window2.m61"
wm minsize .window2 300 300
menu .window2.m61 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 1
.window2.m61 add cascade -menu ".window2.m61.men63" -label file
menu .window2.m61.men63 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 0
.window2.m61.men63 add cascade -menu ".window2.m61.men63.men64" -label {file cascade}
menu .window2.m61.men63.men64 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 0
.window2.m61.men63.men64 add command -command exit -label {exit 1}
.window2.m61.men63.men64 add command -command {#exit 2 command} -label {exit 2}
.window2.m61 add checkbutton -variable menuCheck -command exit -label {menu check}
.window2.m61 add cascade -menu ".window2.m61.men62" -label help
menu .window2.m61.men62 -activeborderwidth 1 -borderwidth 1 -disabledforeground #a3a3a3 -selectcolor #b03060 -tearoff 0
.window2.m61.men62 add command -command {#about 1 command} -label {about 1}
.window2.m61.men62 add command -command {#about 2 command} -label {about 2}
# ------- end of file here -----------------------------------------
Also, another question, when I mix a C program and a TCL script is there a way to hide
the "DOS" window that appears (I think it is tlc_init who launches the interpreter window)
and to keep only the GUI visible?
Thanks a lot for your answers!
Tiago
tiago251@netcourrier.com