Page 1 of 1

TTree disable horizontal scrollbar

Posted: Tue Sep 06, 2011 1:45 pm
by 10546756
Hello!

I'm using TTree as a "menu" in my application. What I would like to do is to disable the vertical scrollbar and always have everything left justified. If some text would reach the right edge of the control it should just be truncated.
Any ideas how to do this?

Regards, Mikael

Re: TTree disable horizontal scrollbar

Posted: Thu Sep 08, 2011 11:40 am
by yeray
Hello Mikael,

Excuse us for the delay here.
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.

Re: TTree disable horizontal scrollbar

Posted: Thu Sep 08, 2011 5:08 pm
by 10546756
Helllo!

Well, its not a bug! But if you se the two attached pictures, in "full view.jpg" the tree at the left It is presented as I want it to be. In the "scrolled.jpg" picture you can se how it looks if it does not fit. In this case I would still want it to be left justified and the horizontal scrollbar removed/invisible (and in leftmost position).

Regards, Mikael

Re: TTree disable horizontal scrollbar

Posted: Fri Sep 09, 2011 11:41 am
by narcis
Hi Mikael,

That's how TreeView1 in TreeMain.pas (the What's New? menu) in the TeeTree2 demo works. You'll find it at, for example, C:\Program Files\Steema Software\TeeChart 2011 for Delphi 2011\Examples. Have you checked it?

Thanks in advance.

Re: TTree disable horizontal scrollbar

Posted: Mon Sep 12, 2011 5:09 pm
by 10546756
I tried loading the demo but it says "The project can not be loaded because the required personality DelphiDotNet.Personality is not loaded"

Is there no simple way just to disable the horizontal scrollbar?

Regards, Mikael

Re: TTree disable horizontal scrollbar

Posted: Tue Sep 13, 2011 6:56 am
by narcis
Hi Mikael,

What about?

Code: Select all

  Tree1.HorzScrollBar.Visible:=False;

Re: TTree disable horizontal scrollbar

Posted: Mon Nov 07, 2011 1:25 pm
by 10546756
Hello!

Sorry for the long delay, havent been working on this project for a while...

Already tried the Visible property but it does not have ant effect.

But I found another property MYTree.Selected.ScrollToView := False; which seems to solve the problem!

Regards, Mikael