Recent

Author Topic: Select graphic object with mouse  (Read 2219 times)

MSC

  • Jr. Member
  • **
  • Posts: 54
Select graphic object with mouse
« on: December 08, 2014, 12:41:12 pm »
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

circular

  • Hero Member
  • *****
  • Posts: 4221
    • Personal webpage
Re: Select graphic object with mouse
« Reply #1 on: December 08, 2014, 02:16:36 pm »
It seems you have already started this topic there:
http://forum.lazarus.freepascal.org/index.php/topic,26524.0.html

Regards
Conscience is the debugger of the mind

MSC

  • Jr. Member
  • **
  • Posts: 54
Re: Select graphic object with mouse
« Reply #2 on: December 08, 2014, 02:59:43 pm »
Sorry - please close it.

 

TinyPortal © 2005-2018