[Lazarus] Visual "uglyness" when creating TSynEdit @ runtime in my app

luiz americo pereira camara luizmed at oi.com.br
Sat Jan 5 11:22:47 CET 2013


2013/1/5 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> On Sat, 05 Jan 2013 08:32:54 +0000
> Martin <lazarus at mfriebe.de> wrote:
>> and therefore finally
>>
>>    s:=PageControl1.AddTabSheet;
>>    PageControl1.ActivePage := s;  // paint tabsheet
>>    l := TSynEdit.Create(self);
>>    l.Parent := s;                               // paint scrollbars, not
>> yet aligned
>>    l.Align := alClient;                      // paint scrollbars
>> (again), this time aligned. Since synedit itself does not yet paint, the
>> previous painted scrollbars remain a visible image
>
> It seems the Win32 intf triggers immediate paints.
> Maybe some win32 developer can explain why.
>

I could not reproduce here.

Using Windows 7 + Lazarus rev 39373 + fpc 2.6.1

MyCode:
  s:=PageControl1.AddTabSheet;
  PageControl1.ActivePage := s;
  l := TSynEdit.Create(self);
  DebugLn('BeforeParent');
  l.Parent := s;
  DebugLn('AfterParent');
  l.Align := alClient;
  DebugLn('AfterClient');

The output:
BeforeParent
AfterParent
AfterClient
SynEditPaint

I also put breakpoint and paint is not called

Luiz




More information about the Lazarus mailing list