[Gambas-user] indexing of buttons

Fiddler63 mx4eva at ...626...
Wed Jan 27 08:48:15 CET 2010


On a basic type calculator I would like to index the buttons, ie 0 to 9,
plus, minus etc.
In VB the following code does that when a button is pressed:

'************************
'all the buttons has the name "Digits"

Private Sub Digits_Click(Index As Integer)

    If ClearDisplay Then

        Display.Caption = ""

        ClearDisplay = False
   'boolean
    End If

    Display.Caption = Display.Caption + Digits(Index).Caption

End Sub
'**************************

In gambas I get an error if I give more that one button the same name.
How do I index a row of buttons in Gambas ?

Ta
Kim
-- 
View this message in context: http://old.nabble.com/indexing-of-buttons-tp27335200p27335200.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list