Repeated spinner block in every layout

Good morning, i'm need help for making a repeated block in every spinner, there is 11 layout where every layout there is a 2 spinner and 1 text box like this (in the "COLOR" layout)

i want to repeat this block because there is 11 same layout with this one
SS2

before this i always copy the block and just change the spinner list, but if there is many spinner it will take a lot of times, is there is any tips and trick for this?

Thanks

You can make lists of components and use the "Any Component" blocks and procedures.

For example, you can have three lists (spinners U1, U2...; spinners SP_U1, SP_U2....; textboxes) and two procedures to implement your two current AfterSelection logic, depending on if the selected spinner is from first list (U1, U2...) or from the other one (SP_U1, SP_U2...)..
If you want to repeat the same layout more times (spinnerUX + spinner_SP_UX + textboxX) you need only to add them to the lists.

Thanks Ramon for your help, ive already try your code, its amazing i dont need to repeatedly copy and change every code and save a lot of time

Screenshot_1

Thankyou so much for your help sir

one more thing, i want to ask about this "any component", i still dont get it about what is "notAlreadyHandled" and "component" means, can you explain to me sir?

Thanks

The parameter "component" contains the component identifier.

in Any Component blocks it is used to be able to identify, from all the spinners, which is the spinner triggering the event AfterSelecting. In this case, we are using it to know if the selected spinner (component which has triggered the event) is from list "spinnerA" o from list "spinnerB", to call to one or other procedure.

The "notAlreadyHandled" of the event indicates if the component (the selected spinner in this case) is already being handled with its specific event block.

If you use, for example, the block Spinner1.AfterSelecting block, then notAlreadyHandled=false.

For the spinners you are not using their specific AfterSelecting blocks, notAlreadyHandled=true. For examle for sinner2, without specific block:

With this capability you can design a generic logic for all the spinners, excerpt for those spinners with their own specific logic.
So, we are using it to ensure that if you place other spinner to do other different logic (with its own AfterSelecting block), that spinner doesn't run this logic.

I hope I have clarified your doubts a little.

Thankyou for your help Ramon, i apreciate ur kindness

1 Like