Runtime control manipulation

Erel

B4X founder
Staff member
Licensed User
Longtime User
Basic4ppc includes some keywords that allow you to easily work with a dynamic number of controls.
The main keywords are:
Control - Calls a control using a string.
Example: Control ("button" & i).Color = cRed

AddEvent - Wires a control event with a specific sub. One sub can handle many controls events.

Sender - The control that raised the event.

This is a short example (50 lines) of using these keywords to create a Tic-Tac-Toe game.
 

Attachments

  • TicTacToe-Control.sbp
    1.7 KB · Views: 410

Cableguy

Expert
Licensed User
Longtime User
I can run it, gives me an excepcion error!!Am i the only one?
 

RandomCoder

Well-Known Member
Licensed User
Longtime User
Works for me :sign0060:

Regards,
RandomCoder
 

Cableguy

Expert
Licensed User
Longtime User
I click on the link and then o open an when i try to run it...
 

Attachments

  • erro.jpg
    erro.jpg
    59.3 KB · Views: 359
Top