Autor Beitrag
Siluro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 74

Win XP Prof., Win XP64 Prof., Win 7 Prof.
Delphi 7 Ent., Delphi XE, Delphi XE5
BeitragVerfasst: Do 24.03.05 13:42 
Hi,
ich hab ein kleines Problem. Ich muss irgendwie die Scrollbar in einem Treeview deaktivieren.
Weiss jemand wie das geht?

MfG

Björn
Siluro Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 74

Win XP Prof., Win XP64 Prof., Win 7 Prof.
Delphi 7 Ent., Delphi XE, Delphi XE5
BeitragVerfasst: Do 24.03.05 17:40 
Also das Problem is gelöst.

1. eigene Klasse erstellen

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
type  
  tree=class(TTreeview)
  protected
    procedure WndProc(var msg: TMessage); override;
  end;


2. die Message WM_WINDOWPOSCHANGING abfangen

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure tree.WndProc(var msg: TMessage);
begin
  inherited;
  if Msg.Msg = WM_WINDOWPOSCHANGING then
    begin
      ShowScrollBar(Self.Handle, SB_HORZ, LongBool(0));
      ShowScrolLBar(Self.Handle, SB_VERT, LongBool(0));
    end;
end;


3. die Klasse "tree" anstatt "TTreeview" benutzen

MfG

Björn