vita_de Posted March 26, 2013 Posted March 26, 2013 I have a template interface elements (blank), I want to use it a few times <vbox name="canvas" export="1" /> <hbox name="blank" export="1"> <editline width="100"></editline> <button><text>OK</text></button> </hbox> WidgetVBox canvas; WidgetHBox blank; canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); canvas.addChild( blank, GUI_ALIGN_EXPAND ); How to do it, tell me an option?
lars.saalbach Posted March 26, 2013 Posted March 26, 2013 Hey Vita, didn't use this but in my "mind" I would try to use a class-array object. Pseudocode: className test = new className(gui); ClassName(){ gui.addUserInterface(thestaticlink.ui) gui.addChild(...);} array stackedClasses. stackedClasses.append(test); test.yourPropertiesToTalkToWidgets. In your .UI file you map normaly like "export=1 name=TestNamespace::TestClass::WidgetName". So you have an array with all your classes and you can pass the actual GUI element with which you wanna work. Maybe this helps you, if any questions are open feel free. greets Lars
vita_de Posted April 18, 2013 Author Posted April 18, 2013 lars.saalbach, Thank you very much. Your advice was very helpful.
Recommended Posts