Set EventName programmatically

warwound

Expert
Licensed User
Longtime User
Hi.

If i create a View programmatically how can i change the View's EventName from it's default value - the default value being the View's name?

For example, i create an array of Buttons (programmatically) and want a single Sub to be called for each Button's click event.

Thanks.

Martin.
 

stevel05

Expert
Licensed User
Longtime User
Try this:

B4X:
Dim Buttons(10) As Object
For i = 0 To 9
   Dim B As Button
   B.Initialize("SubToCall")
   Buttons(i)=B
Next

Steve
 
Upvote 0
Top