The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interface of SDL_DirTree


const
  MaxDirNames = 1900;                { max. number of dir. names to be handled }
  MaxDirNamLeng = 32;          { max. number of characters of a directory name }

type
  DirNameType = array[1..MaxDirNames] of string[32];
  TTxtCase = (tcNochange, tcLower, tcUpper);
  TDirTree = class(TCustomOutLine)
               private
                 XDrive          : Char;
                 XDirectory      : TFileName;
                 XOnChange       : TNotifyEvent;
                 XTxtCase        : TTxtCase;
                 DirNamesP       : ^DirNameType;  { buffer for directory names }
                 NumDNames       : integer;   { number of names in 'DirNamesP' }
               protected
                 procedure BuildMainTree;
                 procedure Change; virtual;
                 procedure Click; override;
                 procedure CreateWnd; override;
                 procedure Expand(Index: Longint); override;
                 procedure Loaded; override;
                 procedure SetDrive (drv: char);
                 procedure SetTextCase (TC: TTxtCase);
                 procedure LoadDirNamesAndSort (CurrentDir: string);
                 procedure InitialSetup;
               public
                 constructor Create(AOwner: TComponent); override;
                 destructor Destroy; override;
                 property  Directory: TFileName  read XDirectory;
                 procedure ReloadRootTree;
               published
                 property Align;
                 property Drive: Char  read XDrive write SetDrive;
                 property Options default [ooStretchBitmaps, ooDrawFocusRect];
                 property Font;
                 property OutlineStyle;
                 property ParentShowHint;
                 property PicturePlus;
                 property PictureMinus;
                 property PictureOpen;
                 property PictureClosed;
                 property PictureLeaf;
                 property ShowHint;
                 property TabOrder;
                 property TabStop;
                 property TxtCase: TTxtCase
                              read XTxtCase write SetTextCase default tcLower;
                 property OnChange: TNotifyEvent  read XOnChange write XOnChange;
                 property OnCollapse;
                 property OnDragDrop;
                 property OnDragOver;
                 property OnEnter;
                 property OnExit;
                 property OnExpand;
             end;





Last Update: 2023-Feb-06