Replace TeeTree after Zoom
Replace TeeTree after Zoom
Hi ,
D2007 + VLC 8.04
How to keep the tree on Top an Left = 0 after Zooming ??
I find the code But, without result
{ var tmpPos : Integer;
begin
tmpPos := (Tree1.HorzScrollBar.Max-Tree1.HorzScrollBar.Min) div 2;
tmpPos := tmpPos - (Tree1.HorzScrollBar.PageSize div 2);
Tree1.View3DOptions.HorizOffset := -tmpPos;
end;
}
E
D2007 + VLC 8.04
How to keep the tree on Top an Left = 0 after Zooming ??
I find the code But, without result
{ var tmpPos : Integer;
begin
tmpPos := (Tree1.HorzScrollBar.Max-Tree1.HorzScrollBar.Min) div 2;
tmpPos := tmpPos - (Tree1.HorzScrollBar.PageSize div 2);
Tree1.View3DOptions.HorizOffset := -tmpPos;
end;
}
E
Re: Replace TeeTree after Zoom
Hi mivchart,
I'm not sure what are you exactly trying to align on the top-left. Could you please send us a complete and simple example project we can run as-is to reproduce the issue here?
I'm not sure what are you exactly trying to align on the top-left. Could you please send us a complete and simple example project we can run as-is to reproduce the issue here?
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Replace TeeTree after Zoom
Hi,
it's simple, i join project with post
exmple code =========================
procedure TForm1.Track_ZoomChange(Sender: TObject); //Not result !
begin
// Change zoom
Tree1.View3DOptions.Zoom:=Track_Zoom.Position;
LabelZoom.Caption:=TeeStr(Tree1.View3DOptions.Zoom)+'%';
//<<<< HERE when i Zoom, the tree create offset on TOP and Left, it's no goodg for user !!!
end;
procedure TForm1.BtAlignTopLeftClick(Sender: TObject);
begin
Track_Zoom.Position:=100; //If Zoom return in 100% > ok Vetical Ofset =0
Tree1.View3DOptions.Zoom:=100; //<<< How take for align on TOP and LEFT=0 if Zoom <> 100%
Tree1.View3DOptions.HorizOffset:=0;
Tree1.View3DOptions.VertOffset:=0;
end;
it's simple, i join project with post
exmple code =========================
procedure TForm1.Track_ZoomChange(Sender: TObject); //Not result !
begin
// Change zoom
Tree1.View3DOptions.Zoom:=Track_Zoom.Position;
LabelZoom.Caption:=TeeStr(Tree1.View3DOptions.Zoom)+'%';
//<<<< HERE when i Zoom, the tree create offset on TOP and Left, it's no goodg for user !!!
end;
procedure TForm1.BtAlignTopLeftClick(Sender: TObject);
begin
Track_Zoom.Position:=100; //If Zoom return in 100% > ok Vetical Ofset =0
Tree1.View3DOptions.Zoom:=100; //<<< How take for align on TOP and LEFT=0 if Zoom <> 100%
Tree1.View3DOptions.HorizOffset:=0;
Tree1.View3DOptions.VertOffset:=0;
end;
- Attachments
-
- TreeZoom.zip
- Porject exmple Zoom tree
- (32.39 KiB) Downloaded 973 times
Re: Replace TeeTree after Zoom
Hi mivchart,
Apparently it seems to be a problem with the Horizontal and Vertical scrollbars that should be reset to 0. The problem then is that the Position property is read-only so the following code isn't accepted:
But it will be accepted if you change TTreeScrollBar's Position property definition TeeTree.pas from:
To this:
I've seen that you are source code customer so, please, try with the changes above and tell us if it works better.
Also note that 8.04 is not the latest version available so, please, try with the latest (8.07).
Apparently it seems to be a problem with the Horizontal and Vertical scrollbars that should be reset to 0. The problem then is that the Position property is read-only so the following code isn't accepted:
Code: Select all
procedure TForm1.Track_ZoomChange(Sender: TObject);
begin
// Change zoom
Tree1.View3DOptions.Zoom:=Track_Zoom.Position;
LabelZoom.Caption:=TeeStr(Tree1.View3DOptions.Zoom)+'%';
Tree1.Draw();
Tree1.Draw();
end;
procedure TForm1.Tree1AfterDraw(Sender: TObject);
begin
Tree1.VertScrollBar.Position:=0;
Tree1.HorzScrollBar.Position:=0;
end;
Code: Select all
property Position:Integer read GetPosition;
Code: Select all
property Position:Integer read GetPosition write SetPosition default 0;
Also note that 8.04 is not the latest version available so, please, try with the latest (8.07).
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Replace TeeTree after Zoom
Hi,
sorry , but no result.
i have changed the code in unit Teetree.pas with example
i have changed my code > but without effect !
end;
My request is simple, if I zoom I want to keep the position and left top = 0 = 0 of my tree for the good look user ?
sorry , but no result.
i have changed the code in unit Teetree.pas with example
Code: Select all
property Position:Integer read GetPosition write SetPosition default 0;
Code: Select all
procedure TFrameEfcTree.Tree1AfterDraw(Sender: TObject);
begin
Tree1.VertScrollBar.Position :=0;
Tree1.HorzScrollBar.Position :=0;
My request is simple, if I zoom I want to keep the position and left top = 0 = 0 of my tree for the good look user ?
Re: Replace TeeTree after Zoom
Hi mivchart,
Have you assigned the AfterDraw event correctly? I haven't posted the code because I've created it at design time.
Have you assigned the AfterDraw event correctly? I haven't posted the code because I've created it at design time.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |
Re: Replace TeeTree after Zoom
i have this code in my form
in my unit teetree, only
Code: Select all
procedure TFrameEfcTree.Tree1AfterDraw(Sender: TObject);
begin
Tree1.VertScrollBar.Position :=0; //no result !!
Tree1.HorzScrollBar.Position :=0;
end;
procedure TFrameEfcTree.Tree1Zoom(Sender: TObject);
begin
if not ZoomChange then begin
// Show % percent of zoom in label
LabelZoom.Caption:=TeeStr(Tree1.View3DOptions.Zoom)+'%';
Tree1.draw();
Tree1.draw();
end;
end;
in my unit teetree, only
Code: Select all
property Position:Integer read GetPosition write SetPosition default 0; //MD 4.215
Re: Replace TeeTree after Zoom
Hi mivchart,
I see you've included the Tree1Zoom event that wasn't in the project you sent.
I've added this to the defect list to be revised in future releases (TV52014910) but in the meanwhile please, try with event like Zoom, AfterDraw,... as you do.
I've seen that the Horizontal and Vertical ScrollBars are changing their Min and Max values when zooming. The problem could come from here.
I see you've included the Tree1Zoom event that wasn't in the project you sent.
I've added this to the defect list to be revised in future releases (TV52014910) but in the meanwhile please, try with event like Zoom, AfterDraw,... as you do.
I've seen that the Horizontal and Vertical ScrollBars are changing their Min and Max values when zooming. The problem could come from here.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |