FilterComboBoxFilter (Delphi)

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

procedure TForm1.FilterComboBox1Change(Sender: TObject);
begin
  FileListBox1.Mask := FilterComboBox1.Mask;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  FilterComboBox1.Filter := 'All files (*.*)|*.*| Pascal files (*.pas)|*.pas';
end;

Uses

Personal tools
Assistance