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.


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to