Lazarus

Programming => LCL => Topic started by: jamie on October 16, 2021, 11:58:41 pm

Title: TGraphicCOntrol question about painting
Post by: jamie on October 16, 2021, 11:58:41 pm
I want to confirm what I have seen from poking around here that I can use a TGraphicControl class to draw an outline on top of an existing control, a TPaintBox for example, with no painting of its background so I can still see the underlayer of the parent,The Paintbox?

 I want to do this so I can capture all the mouse control when the cursor is within its boundaries but I still want the background control to show through except for where I made the drawing of the outline.

 You can think of this as a high light marker on an image of a TPaintbox but able to capture all mouse input within it.

  I know how to do this from the Windows API with transparent windows but I want something that works across the lake.


 
Title: Re: TGraphicCOntrol question about painting
Post by: lainz on October 17, 2021, 12:05:56 am
TGraphicControl uses parent Canvas AFAIK. TPaintBox is TGraphicControl as well.
Title: Re: TGraphicCOntrol question about painting
Post by: jamie on October 17, 2021, 12:19:19 am
Yes, understood but It's getting hard to manage the mouse controls so I need an overlay..

TinyPortal © 2005-2018