On 05/01/2013 01:06, Mattias Gaertner wrote:
On Sat, 5 Jan 2013 00:47:38 +0100
Bart <[email protected]> wrote:

On 1/4/13, Mattias Gaertner <[email protected]> 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







--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to