[Gambas-user] right click menu

mike webb mwebb at ...1362...
Wed Mar 29 14:06:56 CEST 2006


in a form i call form1 i have a tableview which i call tableview1, when 
i right click on tableview1 this function fires:

PUBLIC SUB TableView1_Menu()
    mydataview.menu
END

this calls a class i have created which has the following functions:


PUBLIC SUB menu()
    DIM rightmenu AS Menu   
    DIM addmenuitem AS Menu
    DIM deletemenuitem AS Menu
    DIM editmenuitem AS Menu

    rightmenu = NEW Menu(application.ActiveWindow,FALSE)
    editmenuitem = NEW Menu(rightmenu,FALSE)
    addmenuitem = NEW Menu(rightmenu,FALSE)
    deletemenuitem = NEW Menu(rightmenu,FALSE)

    deletemenuitem.Text = "delete a row"
    editmenuitem.Text = "edit a row"
    addmenuitem.Text = "add a row"

    rightmenu.Popup
END

the menu pops up and has "delete a row","edit a row"," add a row" but 
when i select "edit a row" from the menu the sub editmenuitem_click is 
never called.

PUBLIC SUB editmenuitem_click()
  message.Info("add")
END

anyone see what i'm doing wrong ???




More information about the User mailing list