Hi all,
I'm looking for a way to access a widget by its name in a string, so I can operate modifications on the name and access the widget's methods.
Something like the Javascript's GetElementById(id) or GetElementByName(name) would be perfect.
Actually, my point is to access sequentially to some methods of several brother (same parent) widgets with similar names, so that the next exemple :
Code:
My_Button_1:SetText(textTab[1]);
My_Button_1:Enable();
My_Button_2:SetText(textTab[2]);
My_Button_2:Enable();
...
could be changed in something like that :
Code:
for x=1, y, 1 do
My_Button = AccessMyWidgetByName("My_Button_" .. toString(x));
My_Button:SetText(textTab[x]);
My_Button:Enable();
end
Thank you.
(Excuse my english, I'm french, so donot hesitate to ask me to reformulate some sentences if I expressed them badly).