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.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to