Groups and events

Ken Ray kray at sonsothunder.com
Mon Mar 8 00:55:43 EST 2004


> Card groups are in front of the card. Mouse events go from 
> the control 
> to the card; the group isn't in the path. If you give the group 
> background behavior then it will get the message after the card does.

Yes, but actually it's slightly different - mouse events over an open
area of the group (i.e. not over a control in the group) are not trapped
by the group (they go to the card). Mouse event that are on a control in
the group go to the control, then the group, then the card.

Simple test:

-- Card script
on mouseUp
  answer "Card"
end mouseUp

-- Group script of group that contains a button
on mouseUp
  beep
end mouseUp

Make the group larger than the button that it contains. When you click
on the open area of the group, you get the answer dialog. When you click
on the button, you get a beep.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 




More information about the use-livecode mailing list