[lazarus] GTK team: please specify!

Micha Nelissen M.Nelissen at student.tue.nl
Fri Oct 31 10:08:36 EST 2003


Mattias Gaertner wrote:

> On Fri, 31 Oct 2003 12:51:10 +0100
> Micha Nelissen <M.Nelissen at student.tue.nl> wrote:
> 
> 
>>>>>About TControlSelection.DrawGrabbers:
>>>>>FGrabbers[g].Left/Top are holding the position of a grabber relative 
>>>>>to the
>>>>>client origin of the form.
>>>>>The line
>>>>>Diff:=DC.FormOrigin;
>>>>>gets the DC origin also relative to the form origin.
>>>>>Therefore the grabber is painted at FGrabbers[g].Left-Diff.X.
>>
>>Indeed. I have fixed the code. 
> 
> 
> No.
> 
> You changed the Diff, which is absolutely correct. The bug lies somewhere in
> the calculation of DC.FormOrigin.
> Maybe my lines above were ambigious. An example:
> A designer form is at 100,200, has a TGroupBox at 30,30, with a border of
> 5,5. And there is an non visual component icon at 50,50. These 50,50 is
> relative to the client origin of the form. This means the icon should be
> drawn at 15,15 in the client area of the groupbox.
> 
> Paint messages:
> Don't take this example too serious, it is the system that is important.
> When the LCL gets a paint message for the groupbox, the designer gets also
> the paint message. The paint message DC origin (0,0) is the left,top of the
> client area of the groupbox. So, relative to the client area of the form it
> is 35,35 = DC.FormOrigin.
> So, the icon (at 50,50) is painted at 15,15.

Indeed, but IN the groupbox ! If I now move the groupbox, windows 
remembers it's painted image and the invisible component moves with it. 
How is this handled?

Micha.







More information about the Lazarus mailing list