Get name item definition (label) with a loop (for)
Hi all :)
A my friend asked me if is possible get a name of a label and change the label string with a loop. I have try this code:
rollout Test "test" width:100 height:200 ( label temp1 "hello1" label temp2 "hello2" on Test open do ( for i=1 to 2 do ( local namelabel = "temp" + i as string namelabel.text = "changetext" + i as string ) ) ) createDialog Test
I have always the same error : Unknown property: "text" in "temp1"
How to access the item definition (temp1/temp2) of label then update the value string ? I can do this?
Thanks for any help
Comments
Very nice explanation. I
Very nice explanation. I really got excited for the first look with the code. I use to write the similar kind of code in frequent times.
`
hey again :)
just small thing:
You need to format it and execute it :)
It should works now,
Thanks pixamoon. I tried with
Thanks pixamoon. I tried with the format, but without execute it! hahahahah. I see if it works!
Thanks again for support and patience
`
no prob, anytime :)
...
One more example
bga
Thanks for this good example
Thanks for this good example Barigazy! Thanks again :)