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
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?
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.
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?
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.
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.