Code:

with treeview do begin

   perform( WM_HSCROLL, SB_LINERIGHT, 0 );

   perform( WM_HSCROLL, SB_ENDSCROLL, 0 );

end;

Code:

procedure TMyForm.TreeChange(Sender: TObject; Node: TTreeNode);

var

  i : integer;

  pp, cp : TTreeNode;

begin

  if Assigned(Tree.Selected) then

    begin

      cp := Tree.Selected;

      pp := cp;

      for i := 1 to Round(Tree.Height/30) do

        if cp <> nil then

          begin

            pp := cp;

            cp := cp.GetPrevVisible;

          end;

      Tree.TopItem := pp;

    end;

end;

 

Code:

uses CommCtrl;

procedure tNoScrollbarsTreeview.createparams(var params: TCreateParams);

begin

inherited;

params.style := params.style or TVS_NOSCROLL;

end;