Page 1 of 1

group as object

Posted: Sat Jan 01, 2011 7:15 pm
by emmefisch
Hi there

I try to use the group an an object (object oriented programming). In the group is an image and a label. How can I change after a mousedown on the group the forecolor for only that label? I have cloned the group many times, how can I know the id of the label in the clicked group?

Best
Fredi

Re: group as object

Posted: Sat Jan 01, 2011 9:33 pm
by jmburnod
Hi Fredi,
In the group is an image and a label. How can I change after a mousedown on the group the forecolor for only that label?
If the backgroundbehavior of the group = true, the command set the backgroundcolor of fld "myLabel" of each groups placed.
If the backgroundbehavior of the group = false, the command set backgroundcolor of fld "myLabel" of the clicked group only.

Code: Select all

on mouseup
   set the backgroundcolor of fld "myLabel" to red
end mouseup
how can I know the id of the label in the clicked group

Code: Select all

put the short id of the target into MyId
I hope this help
Best regards
Jean-Marc

Re: group as object

Posted: Sun Jan 02, 2011 2:10 pm
by emmefisch
Hi Jean-Marc
Thank you, that helps.