Notice Of Closure

Please note that this website is due to close down on 15th June 2020.

In the interim I will try to move as much content as possible over to my GitHub account. Thanks to everyone who has supported the site over the years.

» Help

How to create a TTreeView without scrollbars

   
Question
I want to use a TreeView (with more visible items than its window can show), but I don't need its scrollbars. How to do that?

Derive a new control from TTreeView and override its CreateParams method like this:

uses
  CommCtrl;

procedure TNoScrollbarsTreeview.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.style := Params.style or TVS_NOSCROLL;
end;
Original resource: The Delphi Pool
Author: Peter Below
Added: 2009-09-07
Last updated: 2009-09-07

« Return to contents »