Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem to create a menu

Status
Not open for further replies.

Manu2

Programmer
Dec 23, 2002
3
CH

if I am using the method written at the end of this mail to create a menu, how can I transform my first menu button present in File "open task" in a cascade entry (I want to add task1 task2 :
ex :
File
-- Open task
-- task 1
-- task 2
-- Exit

I already know how to do it with the normal way "add cascade" but not with this one.

Thanks for your help

Manu



set descmenu {
"&File" all file 0 {
{command "Open Task" {} "Open task" {} -
{command "E&xit" {} "Exit BWidget demo" {} -command exit}
}
"&Options" all options 0 {
{checkbutton "Toolbar &1" {all option} "Show/hide toolbar 1" {}
-variable Demo::toolbar1
-command {$Demo::mainframe showtoolbar 0 $Demo::toolbar1}
}
{checkbutton "Toolbar &2" {all option} "Show/hide toolbar 2" {}
-variable Demo::toolbar2
-command {$Demo::mainframe showtoolbar 1 $Demo::toolbar2}
}
}
}

set prgtext "Creating MainFrame..."
set prgindic 0
set mainframe [MainFrame .mainframe -menu $descmenu -textvariable Demo::status -progressvar Demo::prgindic]

 
The reason you didn't get a response to this sooner, Manu, is that you didn't tell us what extensions your application is using. MainFrame isn't a built-in Tcl command, and without further information as to whether MainFrame was a procedure added by an extension or somewhere else in your application, most of us didn't have any idea where to start.

I finally had a couple of extra minutes, and so on a whim I did a search for "MainFrame" on Google Groups' ( archive of the comp.lang.tcl newsgroup. There, I found out that MainFrame is part of the BWidgets extension.

You can find the answer to your question by reading the BWidgets documentation, which is at The MainFrame reference page itself is at The documentation has an example, which includes how to add cascades to a menu defined in this manner. - Ken Jones, President
Avia Training and Consulting
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Avia, that is a seriously good deed. No BS.
BTW, thanks for the help with tcl refs and the regsub
correction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top