Is it possible to create a button with dinamically changeable action? I would like to have something like: Public Sub AddGomb2(sz As Integer, m As Integer, x As Integer, y As Integer, q As Container, szoveg As String, operation as String) Dim gomb As Button gomb = New Button(q) As "Gomb2" gomb.Width = sz gomb.Height = m gomb.X = x gomb.Y = y gomb.Text = szoveg End
I would like to replace "Gomb1" with a passed value, so to have a reusable button upon creation. I mean, if I have multiple buttons on a form, i would use: myclass.AddGomb2(....,"action1") myclass.AddGomb2(....,"action2") myclass.AddGomb2(....,"action3") Is that manageable? ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user