Hi List.

After updating to latest trunk version of Lazarus i've experience something quite strange.
I'm using: Lazarus 0.9.31 r30067M FPC 2.4.2 x86_64-linux-gtk 2

I've created a link to a gif that demonstrates the problem clearly. All I have done is added a TScrollBox and two buttons, clicking on button created a TEdit, clicking the other creates a TLabel.

Gif can be found here <http://www.bondechristiansen.net/img/ScrollingWinControl.gif>.

It seem that this problem is present from revision 29944 and onwards?


Kind regards,
Torsten Bonde Christiansen.


== source code ==

unit main;

{$mode objfpc}{$H+}

interface

uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  ExtCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Panel1: TPanel;
    ScrollBox1: TScrollBox;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var
  Lbl: TLabel;
begin
  Lbl := TLabel.Create(ScrollBox1);
  Lbl.Name := 'lbl' + inttostr(ScrollBox1.ComponentCount);
  Lbl.Caption := 'Label... ' + inttostr(ScrollBox1.ComponentCount);
  Lbl.left := 20;
  lbl.Top := (ScrollBox1.ComponentCount * 30) + 10;
  Lbl.Parent := ScrollBox1;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  Edt: TEdit;
begin
  Edt := TEdit.Create(ScrollBox1);
  Edt.Name := 'edit' + inttostr(ScrollBox1.ComponentCount);
  Edt.left := 100;
  Edt.Top := (ScrollBox1.ComponentCount * 30) + 10;
  Edt.Parent := ScrollBox1;
end;

end.



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

Reply via email to