Re: EuGTK: menus, submenus...

new topic     » goto parent     » topic index » view thread      » older message » newer message

In the next example I try the following:

constant menuitem2_main_ide = create(GtkMenuItem,"_Project"), 
 projectmenu = create(GtkMenu), 
	projectnew	= create(GtkMenuItem,"New","Pnew"), 
	projectopen = create(GtkMenuItem,"Open","Popen"), 
	projectsave = create(GtkMenuItem,"Save","Psave"), 
	projectclose = create(GtkMenuItem,"Close","Pclose"), 
	projectrun = create(GtkMenuItem,"Execute/Run EUI","Prun"), 
	projectdebug = create(GtkMenuItem,"Debug/Trace","Pdebug"), 
	projectcheck = create(GtkMenuItem,"Check","Pcheck"), 
	projectshroud = create(GtkMenuItem,"Shroud...","Pshroud"), 
	projectbind = create(GtkMenuItem,"Bind...","Pbind"), 
	projecttranslate = create(GtkMenuItem,"Translate to C","Ptranslate_to_c"), 
	--projectcompile = create(GtkMenuItem,"Compile...","Pcompile"), 
	projectconfig = create(GtkMenuItem,"Configuration","Pconfiguration") 
 
       constant submenuitem1_menu_main_ide = create(GtkMenuItem,"_Compile..."), 
 	projectcompile = create(GtkMenu), 
	projectcompileasexe = create(GtkMenuItem,"Compile as executable","Pcompileasexe"), 
	projectcompileaslib = create(GtkMenuItem,"Compile as *.so library","Pcompileaslib"), 
	projectcompileaswinexe = create(GtkMenuItem,"Cross-Compile as executable ","Pcompileaswinexe"), 
	projectcompileaswinlib = create(GtkMenuItem,"Cross-Compile as *.dll library","Pcompileaswinlib") 
 
	set(projectclose,"sensitive",FALSE) 
	set(projectrun,"sensitive",FALSE) 
	set(projectsave,"sensitive",FALSE) 
	set(projectdebug,"sensitive",FALSE) 
 
	set(projectmenu,"append",projectnew) 
	set(projectmenu,"append",projectopen) 
	set(projectmenu,"append",projectsave) 
	set(projectmenu,"append",projectclose) 
	set(projectmenu,"append",create(GtkSeparatorMenuItem)) 
	set(projectmenu,"append",projectrun) 
	set(projectmenu,"append",projectdebug) 
	set(projectmenu,"append",projectcheck) 
	set(projectmenu,"append",create(GtkSeparatorMenuItem)) 
	set(projectmenu,"append",projectshroud) 
	set(projectmenu,"append",projectbind) 
	set(projectmenu,"append",projecttranslate) 
	set(projectmenu,"append",projectcompile) 
	set(projectmenu,"append",create(GtkSeparatorMenuItem)) 
	set(projectmenu,"append",projectconfig) 
	set(menuitem2_main_ide,"submenu",projectmenu) 
	set(menu_main_ide,"append",menuitem2_main_ide) 
 
	set(projectcompile, "append", projectcompileasexe) 
	set(projectcompile, "append", projectcompileaslib) 
	set(projectcompile,"append",create(GtkSeparatorMenuItem)) 
	set(projectcompile, "append", projectcompileaswinexe) 
	set(projectcompile, "append", projectcompileaswinlib) 
	set(projectmenu,"submenu", projectcompile) 
	set(menuitem2_main_ide,"append", submenuitem1_menu_main_ide) 

but I get an error message:

Error. Can't find method set_submenu for GtkMenu. Open property browser?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu