[Gambas-user] Event in Menu
    Rob 
    sourceforge-raindog2 at ...94...
       
    Thu Aug 14 16:36:26 CEST 2003
    
    
  
On Thursday 14 August 2003 01:00, Rizky Tahara Shita wrote:
> i just wanna ask.. how do i accessed the event click on that menu ???
> so when the menu that i create with coding works just like a menu that i
> designed in gui...
If you know in advance what all the menus will be named, just write the 
appropriately named event subs, e.g.
PRIVATE SUB MyFileOpenMenu_Click(whatever params normally go in a menu click 
event)
If you don't, put it in a control group, something like this:
dim myMenuItem as Object
myMenuItem = new Menu(myMainMenu) AS MenuItem
myMenuItem.Text = "&Open"
myMenuItem.Tag = "FileOpen"
...
PRIVATE SUB MenuItem_Click(params...)
	if LAST.Tag = "FileOpen" Then
		...
Hope that makes some sense.
Rob
    
    
More information about the User
mailing list