FilterComboBoxFilter (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example uses a filter combo box and a file list box on a form. When you select a filter in the filter combo box, the file list box displays only files that match the selected mask.

Code

void __fastcall TForm1::FilterComboBox1Change(TObject *Sender)
{
  FileListBox1->Mask = FilterComboBox1->Mask;
}

__fastcall TForm1::TForm1(TComponent* Owner)
  : TForm(Owner)
{
  FilterComboBox1->Filter = "All files (*.*)|*.*| Executable files (*.exe)|*.exe";
}

Uses

Personal tools
Assistance