[lazarus] Form's TOP and LEFT
smiller at lakefield.net
Wed Jun 14 22:04:44 EDT 2000
Has anyone determined why these are coming out incorrectly sometimes?
When you drop controls on the form, after a few controls the form's top and
left are being reported incorrectly. Ifd you move the form they are
Anyone look at this?
Take a look at other product/projects of mine below!
Get paid to surf the net!
Get paid to surf the net by clicking here too!!!
Home page : http://www.lakefield.net/~smiller
Auto-IP Publisher : http://www.autoip.net
Advanced Clipboard : http://www.lakefield.net/~smiller/advclipboard
Lazarus : http://www.lazarus.freepascal.org
----- Original Message -----
From: "Marc Weustink" <weus at quicknet.nl>
To: <lazarus at miraclec.com>; <lazarus at miraclec.com>
Sent: Wednesday, June 14, 2000 3:48 PM
Subject: ControlDragging was: Re: [lazarus] CVS Changes
> At 13:30 14-06-2000 -0500, Shane Miller wrote:
> >Press the NEW FORM button.
> >Select the Button component and drop it onto the form.
> >Drag the button 2 pixels up. It probably moved a little. Now do it
> >It doesn't work.
> >If you look at the output (look at designerform.pp in mousedown and
> >to see what SHOULD be displayed) you'll see that the TOP and LEFT seem
> >be reported incorrectly.
> >If you MOVE the form then try it again it's reported correctly.
> >This also occurs when trying to place controls onto the form. Sometimes
> >they appear correctly, sometimes not.
> >When they dont you can move the form and thn the next one appears
> >Any ideas?
> Mouse.Cursorpos is given in screen coordinates, not in form coordinates.
> Onmousedown you store Cursorpos (or better, the given X and Y),
> onmouseUp you calc the difference with the new Cursorpos (or better, the
> given X and Y) THe difference is added to the Left and Top.
> I committed a solution which normally should work, however it doesn't due
> to a bug in the MouseMove and MouseUp handlers
> MouseMove / MouseUp should always give the mouseposition X and Y in the
> Sender coordinates. It does as long as the up event occoured in the
> control itself. However if you are outside the control you get the X and Y
> in Form coordinates.
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.miraclec.com/list_archives/lazarus
More information about the Lazarus