[Gambas-user] Arrays of controls..
Stephen Bungay
sbungay at ...981...
Fri Feb 11 17:00:49 CET 2011
Given the following code (Gambas 2.22)
PUBLIC SUB Form_Open()
DIM X AS Integer
DIM ButtonArray[10] AS Object
FOR X = 0 TO 9
ButtonArray[X] = NEW Button(ME)
WITH ButtonArray[X]
.X = 90 + (20 * x)
.Y = 100
.Width = 20
.height = 20
END WITH
NEXT
END
How then would one trap the events being raised by a click on one of
the buttons in ButtonArray[]?
I'm assuming (a bad thing... I know) that the array 'ButtonArray'
persists after Form_Open completes and until the form is closed.
More information about the User
mailing list