On Mon, 7 Jan 2008 10:27:39 +0100
Damien Gerard <[EMAIL PROTECTED]> wrote:

> 
> Hi !
> 
> I have a lot of controls created on the fly, with a lot of Resize  
> (Anchors, width/height) and as far I remember I had to call  
> Application.ProcessMessages with Delphi to have proper resizes.
> 
> However in Lazarus I don't know when I have to call for more  
> efficiency it and if it is really necessary.
> 
> (Those resize happen during OnClick events too)

Application.ProcessMessages is only needed if your program process a
lot of data taking a long time or waits for another process. Otherwise
the LCL calls Application.ProcessMessages automatically.

To reduce overhead use

procedure TFrom.Button1Click(Sender: TObject);
begin
  DisableAlign;
  try
    .. create controls or change several properties ..
  finally
    EnableAlign;
  end;
end;


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to