group as object

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
emmefisch
Posts: 27
Joined: Thu Jul 23, 2009 2:50 am

group as object

Post by emmefisch » Sat Jan 01, 2011 7:15 pm

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: group as object

Post by jmburnod » Sat Jan 01, 2011 9:33 pm

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
https://alternatic.ch

emmefisch
Posts: 27
Joined: Thu Jul 23, 2009 2:50 am

Re: group as object

Post by emmefisch » Sun Jan 02, 2011 2:10 pm

Hi Jean-Marc
Thank you, that helps.

Post Reply