delphi.gif (306 バイト) DirectoryOutlineの使い方


DirectoryOutlineはDirectoryListBoxに似ています。ヘルプはないので\Delphi3\Source\Samplesの下にあるソースを見て使い方を調べます。

 

toach.gif (917 バイト) ドライブを変更するには

Driveプロパティを変更するとドライブを変更できます。

procedure TForm1.DriveComboBox1Change(Sender: TObject);
begin
DirectoryOutline1.Drive := DriveComboBox1.Drive;
DirectoryOutline1.Repaint;
end;

 

toach.gif (917 バイト) 現在のフォルダを得るには

Directoryプロパティを読むと現在のフォルダを知ることができます。

StatusBar1.Panels[0].Text := DirectoryOutline1.Directory;