Handling LOTS of buttons

MFX

Member
Licensed User
Longtime User
In the app I'm currently working on I has 16 buttons which all do virtually the same thing so the same code for handling them is duplicated 16 times with the only difference being the button number, the same number is also used for various status flags etc. within each button sub routine. Copying and pasting the code and then going through manually changing the button number in each sub routine is just bearable at the moment but I'm hoping to move the code to a Tablet with bigger screen that will handle a lot more buttons and the existing approach will be a major PITA so how is this normally done? I know Microsoft had the concept of "button arrays" in earlier versions of VB which made this sort of thing simple although they've now droped them and I'm not sure how they do it now as I don't really use VB much these days.

Martin.
 

MFX

Member
Licensed User
Longtime User
Ah! thanks perfect. I actually did a search on "arrays" but the term "views" threw me off scent
 
Last edited:
Upvote 0
Top