[Lazarus] Scrolling Wincontrol
Torsten Bonde Christiansen
tc at epidata.dk
Tue Mar 29 14:08:27 CEST 2011
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110329/7fe254b8/attachment-0002.html>
More information about the Lazarus
mailing list