EuGTK: menus, submenus...

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

Hello,

I would like to add a submenu with the menuitems "template", "script", "text file", "project", "source code file" to the menuitem "New". How can I do it? I would also like to add an icon to the right of menu item "New" (an arrow i.e) to show that it contains a submenu.

constant menu_main_ide = create(GtkMenuBar)  
	pack(panel_main_ide,menu_main_ide) 
 
constant menuitem1_main_ide = create(GtkMenuItem,"_File"), 
 filemenu = create(GtkMenu), 
	filenew	= create(GtkMenuItem,"New","Fnew"), 
	fileopen = create(GtkMenuItem,"Open","Fopen"), 
	fileclose = create(GtkMenuItem,"Close","Fclose"), 
	fileprint = create(GtkMenuItem,"Print","Fprint"), 
	filerun = create(GtkMenuItem,"Execute","Frun"), 
	fileexit = create(GtkMenuItem,"Quit","Quit") 
 
	set(fileclose,"sensitive",FALSE) 
	set(filerun,"sensitive",FALSE) 
	set(filemenu,"append",fileopen) 
	set(filemenu,"append",fileclose) 
	set(filemenu,"append",create(GtkSeparatorMenuItem)) 
	set(filemenu,"append",filerun) 
	set(filemenu,"append",create(GtkSeparatorMenuItem)) 
	set(filemenu,"append",fileexit) 
	set(menuitem1_main_ide,"submenu",filemenu) 
	set(menu_main_ide,"append",menuitem1_main_ide) 

thank you, Raúl

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

Search



Quick Links

User menu

Not signed in.

Misc Menu