Page 1 of 1

TeeTree strange scrollbar behaviour

Posted: Fri Nov 04, 2011 12:12 pm
by 10547181
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?

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.

Re: TeeTree strange scrollbar behaviour

Posted: Fri Nov 04, 2011 2:54 pm
by yeray
Hello Collinor,

You are right. It's strange because the same TeeChart+TeeTree sources seem to behave differently with different IDEs. With D7 it works as expected, but with RAD XE2.
I've added it to the wish list to be investigated for future releases (TV52015816).

Re: TeeTree strange scrollbar behaviour

Posted: Mon Nov 07, 2011 8:43 am
by 10547181
Hello Yeray,

Sorry, the sources are not the same. With Delphi 2007 TeeChart Pro 8.07 is installed. With Delphi XE2, TeeChart Pro v2011 is installed. It would be very helpful, if you could provide a hot fix for the TeeChart Pro v2011 sources. I think this is a serious bug.

Re: TeeTree strange scrollbar behaviour

Posted: Mon Nov 07, 2011 1:16 pm
by yeray
Hello Collinor,

Excuse me. I think I wasn't very clear.
I tried the same source code version (PreRelease v2011.04) in both Delphi 7 and Delphi XE2, and it behaved different. That's what makes me think the problem seems related to the IDE, what doesn't necessarily mean not to be TeeChart related.
I've investigated it further and found what looks like a change of decision of the compiler when has to choose between two properties with the same name, one from the parent class and one in a "with" clause.
We'll make the necessary changes to avoid this ambiguity and solve this problem with the TeeTree scrollbars in XE2.