FindObjectRect/Selection direction

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

FindObjectRect/Selection direction

Postby HPW » April 23rd, 2006, 7:16 am

There is the function FindObjectAt.
But the demo app provides the function to drag the dotted rectangle around some objects and all objects that touch the rectangle gets selected.

So is it possible to add a function to SG:

FindObjectRect(TRect,MakeVisibleSelectionFlag,ShiftKeyState)

which does the same by code.
It return a list of the objects found inside.

Another idea comes from autocad.
There you drag a selection-frame around objects, where the drag-direction plays a role. Draging the selection-frame from left-to-right selects all obects that are complete inside the frame. Draging the selection-frame from right-to-left selects all objects which are inside but also all objects which cross the selection-frame (like the current method of SG). Also using a different line type for the different selection-directions would be usefull.
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 238
Joined: February 25th, 2006, 10:19 am
Location: Germany

Postby Kambiz » April 23rd, 2006, 12:48 pm

Each object has a ContainsRect method, which you can use it to find objects within a rectangle.

In the next release, I may add an extra parameter to ContainsRect method, so that user can choose Including or Intersecting behavoir.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby HPW » April 23rd, 2006, 12:53 pm

Oops, I have overlooked that function. :oops:
Thanks for the info.

In the next release, I may add an extra parameter to ContainsRect method, so that user can choose Including or Intersecting behavoir.


Would be nice addition.
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 238
Joined: February 25th, 2006, 10:19 am
Location: Germany


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 3 guests

cron