yes you are right ... it was my mistake during copy/paste On 3/10/2016 21:00 μμ, Gianluigi wrote: > In my Ubuntu the your code without *hMenu.Name = "hMenu"* do not work. > > And this code is unnecessary: > > Public Sub TrayIcon1_Click() > > hMenu.Popup > > End > > Public Sub Timer1_Timer() > > If Me.Visible == True Then > Me.Visible = False > Endif > > End > > 2016-10-03 18:38 GMT+02:00 Demosthenes Koptsis <demosthen...@gmail.com>: > >> Yes it works also in Ubuntu Mate. >> >> Final code: >> ---------------------- >> ' Gambas class file >> >> Public hMenu As Menu >> Public hMenu2 As Menu >> Public hMenu3 As Menu >> >> Public Sub Form_Open() >> >> TrayIcon1.PopupMenu = "hMenu" >> TrayIcon1.Show >> TrayIcon1.Visible = True >> >> 'Create the popup menu >> hMenu = New Menu(Me, True) As "RootMenu" >> >> hMenu2 = New Menu(hMenu) As "Menu2" >> hMenu2.Text = "Mount ISO" >> >> hMenu3 = New Menu(hMenu) As "Menu3" >> hMenu3.Text = "Unmount ISO" >> >> End >> >> Public Sub TrayIcon1_Click() >> >> hMenu.Popup >> >> End >> >> Public Sub Timer1_Timer() >> >> If Me.Visible == True Then >> Me.Visible = False >> Endif >> >> End >> >> Public Sub Menu2_Click() >> >> Message.Info("hello Menu2") >> >> End >> >> Public Sub Menu3_Click() >> >> Message.Info("hello Menu3") >> >> End >> ---------------------------- >> >> On 3/10/2016 19:18 μμ, Gianluigi wrote: >>> Hello Charlie, >>> It also works the message? >>> >>> 2016-10-03 15:55 GMT+02:00 Charlie <char...@cogier.com>: >>> >>>> Your code works fine in Linux Mint 18 Cinnamon 64bit >>>> http://www.cogier.com/gambas/TestG.png >>>> <http://www.cogier.com/gambas/TestG.png> >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://gambas.8142.n7.nabble. >>>> com/Menu-has-no-Click-event-tp57442p57457.html >>>> Sent from the gambas-user mailing list archive at Nabble.com. >>>> ------------------------------------------------------------ >>>> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>>> >>>> >>>> ------------------------------------------------------------ >> ------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >>>> >>>> >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> Gambas-user mailing list >> Gambas-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user