On Jun 19, 2006, at 11:23 AM, Alexander Bauza wrote:
List...
Is there an easy way to know what object (Object2D) did I 'click'
in a Group2D???
The RectShape has a Contains(X,Y) which returns true if X,Y is within
the bounds of the RectShape. So in the Canvas mousedown event, for
example, you can loop through each item in your Group2D using IsA to
identify a RectShape and when identified check its Contains property
for true. However, other types of 2DObjects don't have a Contains
property, so this technique may be easy or difficult to implement
depending on your specific Group2D. It's quite likely that you may
need to add an appropriate RectShape into your Group2D which can
serve as a bounding rectangle for mouse clicks.
Best regards,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>