/Turbo4/TurboPhp/bin/ExplorerView.pas

http://turbophp.googlecode.com/ · Pascal · 43 lines · 30 code · 9 blank · 4 comment · 2 complexity · e4d01017f4bfb8ff64439c4259f9f681 MD5 · raw file

  1. unit ExplorerView;
  2. interface
  3. uses
  4. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5. Dialogs, Menus, ComCtrls, ToolWin,
  6. VirtualTrees, VirtualExplorerTree, StdCtrls;
  7. type
  8. TExplorerForm = class(TForm)
  9. ExplorerTree: TVirtualExplorerTree;
  10. NoFolderLabel: TLabel;
  11. procedure FormResize(Sender: TObject);
  12. private
  13. { Private declarations }
  14. procedure SetRootFolder(const Value: string);
  15. public
  16. { Public declarations }
  17. property RootFolder: string write SetRootFolder;
  18. end;
  19. implementation
  20. {$R *.dfm}
  21. { TExplorerForm }
  22. procedure TExplorerForm.SetRootFolder(const Value: string);
  23. begin
  24. ExplorerTree.Visible := (Value <> '');
  25. NoFolderLabel.Visible := not ExplorerTree.Visible;
  26. if Value <> '' then
  27. ExplorerTree.RootFolderCustomPath := Value;
  28. end;
  29. procedure TExplorerForm.FormResize(Sender: TObject);
  30. begin
  31. if Height < 10 then
  32. Beep;
  33. end;
  34. end.