Friends,
I got stuck on a problem of selecting a graphical object. Also on brother google I´ve found no useful results. Since this is very common in many programs (like CAD, FlowChart), all sourcecode I have found was very special, difficult to understand and not applicable to my problem.
My problem:
I´m going to create a piece of software similar to a flowchart. So I have created a basic object TRectangle in a separate unit. In my main program, I have created many different graphical objects (e.g. colorized rectangles) which are inherited fom TRectangle and placed them on a TImage canvas. Now I want to select one of these objects and move it around the canvas using mouse down-move-up.
I think I know the basic functionality to move the object, but in the mouse routines the actual clicked object is needed.
How can I find out, which object was clicked?
Regards
MSC
Windows 7 64 bit
Lazarus 1.2.4 32 bit
FPC 2.6.4