<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi List.<br>
<br>
After updating to latest trunk version of Lazarus i've experience
something quite strange.<br>
I'm using: Lazarus 0.9.31 r30067M FPC 2.4.2 x86_64-linux-gtk 2<br>
<br>
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.<br>
<br>
Gif can be found <a
href="http://www.bondechristiansen.net/img/ScrollingWinControl.gif">here</a>.<br>
<br>
It seem that this problem is present from revision 29944 and
onwards?<br>
<br>
<br>
Kind regards,<br>
Torsten Bonde Christiansen.<br>
<br>
<br>
== source code ==<br>
<br>
unit main; <br>
<br>
{$mode objfpc}{$H+}<br>
<br>
interface<br>
<br>
uses<br>
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
StdCtrls,<br>
ExtCtrls;<br>
<br>
type<br>
<br>
{ TForm1 }<br>
<br>
TForm1 = class(TForm)<br>
Button1: TButton;<br>
Button2: TButton;<br>
Panel1: TPanel;<br>
ScrollBox1: TScrollBox;<br>
procedure Button1Click(Sender: TObject);<br>
procedure Button2Click(Sender: TObject);<br>
private<br>
{ private declarations }<br>
public<br>
{ public declarations }<br>
end; <br>
<br>
var<br>
Form1: TForm1; <br>
<br>
implementation<br>
<br>
{$R *.lfm}<br>
<br>
{ TForm1 }<br>
<br>
procedure TForm1.Button1Click(Sender: TObject);<br>
var<br>
Lbl: TLabel;<br>
begin<br>
Lbl := TLabel.Create(ScrollBox1);<br>
Lbl.Name := 'lbl' + inttostr(ScrollBox1.ComponentCount);<br>
Lbl.Caption := 'Label... ' +
inttostr(ScrollBox1.ComponentCount);<br>
Lbl.left := 20;<br>
lbl.Top := (ScrollBox1.ComponentCount * 30) + 10;<br>
Lbl.Parent := ScrollBox1;<br>
end;<br>
<br>
procedure TForm1.Button2Click(Sender: TObject);<br>
var<br>
Edt: TEdit;<br>
begin<br>
Edt := TEdit.Create(ScrollBox1);<br>
Edt.Name := 'edit' + inttostr(ScrollBox1.ComponentCount);<br>
Edt.left := 100;<br>
Edt.Top := (ScrollBox1.ComponentCount * 30) + 10;<br>
Edt.Parent := ScrollBox1;<br>
end;<br>
<br>
end.<br>
<br>
<br>
<br>
</tt>
</body>
</html>