Recent

Author Topic: Drawing a line with the mouse.  (Read 331 times)

lazer

  • Sr. Member
  • ****
  • Posts: 269
Drawing a line with the mouse.
« on: September 09, 2025, 05:08:20 am »
Hi,

I want to draw line as drag the mouse across a grid letters.

I have the grid as a bunch of single letter sized Tpanels on a parent Tpanel.

I currently select them one at a time by clicking on them but I would like do mouseDown on the first and mouseUp on the last to select them, and draw a line from the mouseDown point to the current mouse x,y as I drag to give feedback to the user.

I'm at a bit of a loss how to go about this in Lazarus.

Can anyone tell me how I could go about this?

TIA.

hedgehog

  • Jr. Member
  • **
  • Posts: 75
Re: Drawing a line with the mouse.
« Reply #1 on: September 09, 2025, 09:06:13 am »
Like this?

lazer

  • Sr. Member
  • ****
  • Posts: 269
Re: Drawing a line with the mouse.
« Reply #2 on: September 09, 2025, 03:34:17 pm »
That looks like exactly what I want to do.

Many thanks.

 

TinyPortal © 2005-2018