display("Title","Content",["OK,"CANCEL"])
def display(title,content,options):
...
# CREATION OF NEW OBJECTS
for items in options:
?System.CreateByName("POPUP_OPTION_BG","POPUP",Window.Width-128-option_offset,POPUP_TITLE_BG.Y+POPUP_BG.Height+32)
?System.CreateByName("txt_option","POPUP",Window.Width-128-option_offset,POPUP_TITLE_BG.Y+POPUP_BG.Height+32)
?#System.Create("txt_option","POPUP",Window.Width-128-option_offset,POPUP_TITLE_BG.Y+POPUP_BG.Height+32)
?option_offset += 144
The trouble starts when I try to assign Text values to those objects. I want to iterate through them and set every each instance with it's own option text. I've tried setting the text on creation and this method (found on SourceForge net page), just to set every instance with this text, for debug reasons:
for t in txt_option:
t.Text= "something"
but it didn't work as expected. This sets the new text for only one instance, the one existing in the layout before the creation. Is there a way to do this at all? I really would prefer dynamic creation of objects rather than hiding / showing trick for objects already on the layout...
Any help appreciated!