Example:
I have a group "abc". Inside group "abc", I have two controls: group "def" and graphic "myGraphic". Inside of group "def", I have another graphic, also named "myGraphic".
If I want to refer to the graphic "myGraphic" that is directly inside group "abc", how can I do that?
Normally, I'd write something like:
Code: Select all
put the backgroundcolor of graphic "myGraphic" of group "abc"
The reason I need this is because I am trying to programatically create controls, which might be nested inside of themselves. It would be really nice to refer to the direct child controls of a specified group. For now, the only workaround I have is to set a custom property that keeps the id of each child control when the group is first created. Then I have to reference my direct controls using:
Code: Select all
// At creation time, before putting anything inside my subgroup:
set the uControlX of me to the id of control "x" of me
...
//To later refer to the control "x" of me, and not control "x" of group "y" of me
put the backgroundcolor of control id (the uControlX of me) of me
Code: Select all
put the backgroundcolor of graphic "myGraphic" of group "abc" exact