TeeTree strange scrollbar behaviour
Posted: Fri Nov 04, 2011 12:12 pm
We installed TeeChart 2011 source code for XE2 of Oct, 4th using the Recompile app and use Delphi XE2, Update 2.
We build a simple sample app, just a form containing a TTree with Align = alClient, a panel with Align = alTop, a button on the panel that adds a child node under the node added before when clicked (see code below).
Now, as more child nodes are added the scrollbars are getting bigger. That's strange. I would expect that the scrollbars are getting smaller as more child nodes are added. Same sample app with TeeTree of TeeChart 8.07 and Delphi 2007 behaves correctly.
Any ideas?
We build a simple sample app, just a form containing a TTree with Align = alClient, a panel with Align = alTop, a button on the panel that adds a child node under the node added before when clicked (see code below).
Now, as more child nodes are added the scrollbars are getting bigger. That's strange. I would expect that the scrollbars are getting smaller as more child nodes are added. Same sample app with TeeTree of TeeChart 8.07 and Delphi 2007 behaves correctly.
Any ideas?
Code: Select all
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, VCLTee.TeeProcs,
Vcl.StdCtrls, TeeTree;
type
TForm1 = class(TForm)
Tree1: TTree;
Panel1: TPanel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
uxNode : TTreeNodeShape;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
if not Assigned(uxNode) then
uxNode := Tree1.AddRoot('R')
else
uxNode := uxNode.AddChild('x');
if assigned(uxNode.Parent) then
uxNode.Parent.Expanded := True;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
uxNode := nil;
end;
end.