zapat 55 Posted February 10, 2014 I have a controlsGroup with images, texts and some buttons. Now the number of the needed controlGroups is changing. Sometimes I need 2, sometimes I need 10 different instances, but the same class. (just like BIS does the unitInfo in the commandBar: same unitInfo class, but number of instances depends on the unit count) Is it possible to add some dinamism to control creation (eg. a foor loop) upon dialog creation, or do I have to manually create goup1, grop2, ...group10, and make unused invisible? Share this post Link to post Share on other sites
lappihuan 178 Posted February 11, 2014 you should be able to do that, with the format command: for [{_x=1},{_x<=10},{_x=_x+1}] do { _myDialog = createDialog format["group%1",_x]; }; Share this post Link to post Share on other sites
zapat 55 Posted February 11, 2014 Lappihuan:I meant controls within a dialog/display. Thanks for the answer anyways. Share this post Link to post Share on other sites
lappihuan 178 Posted February 11, 2014 (edited) hmm, I haven't done much with dialogs until now. Iceman could probably help but he is somehow missing from the forums... have a dialog question for him too ^^ Edit: How about depbo the UI data from the game and see how its done in there? Edited February 12, 2014 by Lappihuan Share this post Link to post Share on other sites