B4J Question [ABMATERIAL] multiple ABMButton with one event sub

mcGeorge

Member
Licensed User
Longtime User
Hi @all,

I would like to create dynamic several buttons, depend on records in a database table. For every record one Button. I checked it, it is not possible to create several buttons with the same button id. It is not a problem to generate a unique id for these buttons but how can I handle the click event.

If I understand that correct, I need for every button a separate event sub, because the name of the event has to be [button id]_Clicked. And I don't find the possibility to set explicit the event name.

What is the best way to handle it?

Thanks in advance
George
 

Cableguy

Expert
Licensed User
Longtime User
If a dedicated sub is the only way, you can use a custom sub passing to it the button I'd or tag, and calling it from each button event
 
Upvote 0
Top