[Lazarus] Visual "uglyness" when creating TSynEdit @ runtime in my app
Martin
lazarus at mfriebe.de
Sat Jan 5 09:32:54 CET 2013
On 05/01/2013 01:06, Mattias Gaertner wrote:
> On Sat, 5 Jan 2013 00:47:38 +0100
> Bart <bartjunk64 at gmail.com> wrote:
>
>> On 1/4/13, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
>>
>>> It sounds like a bug in the LCL Win32 interface.
>>> I don't have win32 here to test.
>>> There should be no Paint events during your code. Are there?
>> How do I test this?
> Set the OnPaint event of the synedit and add a debugln.
>
>
Just for reference, I did some tests on Win Vista 32 bit
s:=PageControl1.AddTabSheet;
l := TSynEdit.Create(self);
l.Align := alClient;
l.Parent := s;
PageControl1.ActivePage := s;
ActivePage will trigger painting, but it first aligns the SynEdit, so I
get a correct display.
s:=PageControl1.AddTabSheet;
PageControl1.ActivePage := s;
l := TSynEdit.Create(self);
l.Align := alClient;
l.Parent := s;
- again ActivePage causes painting, but synEdit is not existent yet-
- l.Parent := s; causes SynEdit to be correctly resized. Also paints
the SynEdit's Scrollbars (does not call synEdit paint, only scrollbars /
Scrollbars cover client area)
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
More information about the Lazarus
mailing list