View Issue Details

IDProjectCategoryView StatusLast Update
0019020LazarusLCLpublic2011-03-30 08:44
ReporterTorsten Bonde ChristiansenAssigned ToPaul Ishenin 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSLinuxOS VersionUbuntu 10.04
Product Version0.9.31 (SVN)Product Buildr29944 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0019020: Scrolling WinControl does not scroll all controls equally
DescriptionUsing a TSrollbox that contains a mix of TLabel's and TEdit's does not scroll the controls equally using the vertical scrollbar.

See the attached image demonstrating the problem.
Additional InformationCode for a form demonstrating the problem.

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.
TagsNo tags attached.
Fixed in Revision30076
LazTarget-
WidgetsetGTK 2
Attached Files

Activities

2011-03-29 14:21

 

ScrollingWinControl.gif (229,870 bytes)
ScrollingWinControl.gif (229,870 bytes)

Zeljan Rikalo

2011-03-29 14:32

developer   ~0046920

Please attach complete project, not partial unit code.

Paul Ishenin

2011-03-30 03:43

manager   ~0046932

Please test and close if ok.

Torsten Bonde Christiansen

2011-03-30 08:44

reporter   ~0046935

Works like a charm. Thanks.

Issue History

Date Modified Username Field Change
2011-03-29 14:21 Torsten Bonde Christiansen New Issue
2011-03-29 14:21 Torsten Bonde Christiansen File Added: ScrollingWinControl.gif
2011-03-29 14:21 Torsten Bonde Christiansen Widgetset => GTK 2
2011-03-29 14:32 Zeljan Rikalo LazTarget => -
2011-03-29 14:32 Zeljan Rikalo Note Added: 0046920
2011-03-29 14:32 Zeljan Rikalo Status new => feedback
2011-03-30 03:43 Paul Ishenin Fixed in Revision => 30076
2011-03-30 03:43 Paul Ishenin Status feedback => resolved
2011-03-30 03:43 Paul Ishenin Fixed in Version => 0.9.31 (SVN)
2011-03-30 03:43 Paul Ishenin Resolution open => fixed
2011-03-30 03:43 Paul Ishenin Assigned To => Paul Ishenin
2011-03-30 03:43 Paul Ishenin Note Added: 0046932
2011-03-30 08:44 Torsten Bonde Christiansen Note Added: 0046935
2011-03-30 08:44 Torsten Bonde Christiansen Status resolved => closed