Hello community and please help.
I have nine buttons and 18 images. Two images are assigned to each button and they change when the button is pressed.
I would like to reduce the number of blocks using “Any Button” but I have no idea how to do it.
the first step without advanced blocks is to use a procedure to set all buttons to the b version
on each button click event call that procedure and set only the image which switches to the a version
after you got this then we can think about reducing this even more and use the advanced blocks
I didn’t think about using the “Procedure”.
I checked. Works correctly.
A lot less blocks, but I would like to learn how to use “Any components”.
you can study these examples
you will need a list of the button components
while using the any button click event, the index in list block can give you the index of the current component to set the text of Label1
take it as an idea/reference and work on your need
Thank you gentlemen for your help.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.