Loop through control name + index

Hi everyone
My app contain 5 row of 5 PopupMenu
Each row is built with index 0 to 4 PopupMenu ( thats fine i’m able to call each separately ) var ( j )
But How can i can reach each PopupMenu root PopupMenu1 / PopupMenu2 / PopupMenu3 / PopupMenu4 / PopupMenu5 in a loop
I’v try to replace id by var ( i )… obviously it doesn’t work
Hoping my explanation is clear

for i = 1 to 5 While PopupMenu(i)(j) <> nil LystYndex.Append(PopupMenu(i)(j).ListIndex) j= j +1 wend next
thanks

[quote=230671:@Denis Despres]Hi everyone
My app contain 5 row of 5 PopupMenu
Each row is built with index 0 to 4 PopupMenu ( thats fine i’m able to call each separately ) var ( j )
But How can i can reach each PopupMenu root PopupMenu1 / PopupMenu2 / PopupMenu3 / PopupMenu4 / PopupMenu5 in a loop
I’v try to replace id by var ( i )… obviously it doesn’t work
Hoping my explanation is clear

for i = 1 to 5 While PopupMenu(i)(j) <> nil LystYndex.Append(PopupMenu(i)(j).ListIndex) j= j +1 wend next
thanks[/quote]

Select all your popupmenus and in the Inspector gear icon pane, make them into a Control Set. After Which you will be able to do what you posted. You will have to separate each in the Change and other events by the index property that will be available.

Thank Michel… it seems easy but
is it DoAble in RS 2012.2.1
No Gear Icon

Yes it is. Give them the same name and the IDE will prompt you to create a control set. After the second one with the same name, it just automatically adds them to the set. Alternately, give them the same name and set the Index property yourself.