DirList (C++)
Description
This example uses a file list box, a directory list box, a filter combo box, a drive combo box, a label, an edit box, and a button on a form. When you run the application, enter a path or filename in the edit box, and press the button, all the controls update.
Code
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
FileListBox1->FileEdit = Edit1;
FilterComboBox1->FileList = FileListBox1;
DirectoryListBox1->FileList = FileListBox1;
DirectoryListBox1->DirLabel = Label1;
DriveComboBox1->DirList = DirectoryListBox1;
Button1->Default = true;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
FileListBox1->ApplyFilePath(Edit1->Text);
}
Uses
- Vcl.FileCtrl.TFileListBox.ApplyFilePath ( fr | de | ja )
- Vcl.FileCtrl.TFileListBox.FileEdit ( fr | de | ja )
- Vcl.FileCtrl.TFilterComboBox.FileList ( fr | de | ja )
- Vcl.FileCtrl.TDirectoryListBox.DirLabel ( fr | de | ja )
- Vcl.FileCtrl.TDriveComboBox.DirList ( fr | de | ja )
- Vcl.FileCtrl.TDirectoryListBox.FileList ( fr | de | ja )
- Vcl.StdCtrls.TCustomButton.Default ( fr | de | ja )