Try the following:
declare Main FileMenu QTk
[QTk]={Module.link ["x-oz://system/wp/QTk.ozf"]}
proc {Skip}
skip
end
FileMenu=menu(command(text:"Open Solution"
action:Skip)
command(text:"Save Solution"
action:Skip)
separator
command(text:"Import Data"
action:Skip)
command(text:"Export Solution"
action:Skip)
separator
command(text:"Quit"
action:Skip))
%%
Main=td(title:"A toplevel widget"
geometry:geometry(width:1024 height:768)
resizable:resizable(width:false height:false)
menubutton(glue:w
text:"File"
menu:FileMenu))
%%
{{QTk.build Main} show}
Best
Torsten
On 17.09.2009, at 14:09, mark richardson wrote:
Hi,
Can anyone please help with creating a menubar in QTk. The
documentation
states a menu description can be used with the 'menu' parameter of a
toplevel widget. But, when I try the code below
declare Main FileMenu QTk
[QTk]={Module.link ["x-oz://system/wp/QTk.ozf"]}
proc {Skip}
skip
end
FileMenu=menu(command(text:"Open Solution"
action:Skip)
command(text:"Save Solution"
action:Skip)
separator
command(text:"Import Data"
action:Skip)
command(text:"Export Solution"
action:Skip)
separator
command(text:"Quit"
action:Skip))
Main=td(title:"A toplevel widget"
geometry:geometry(width:1024 height:768)
resizable:resizable(width:false height:false)
menu:FileMenu)
{{QTk.build Main} show}
I get this error
%************************ Error: QTk module *********************
%**
%** Invalid parameter
%**
%** Parameter: menu
%** Widget type: toplevel
Which seems to contradict what the documentation is saying.
regards
Mark
--
Mark Richardson
Research Assistant
University of Teesside, UK
Email: [email protected]
[email protected]
Skype: mark.richardson.
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users