unit FilterComboBoxFilter;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, FileCtrl;

type
  TForm1 = class(TForm)
    FilterComboBox1: TFilterComboBox;
    FileListBox1: TFileListBox;
    procedure FilterComboBox1Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// BeginExample: FilterComboBoxFilter
// Property: FileCtrl.TFilterComboBox.Filter
// Property: FileCtrl.TFileListBox.Mask
// Property: FileCtrl.TFilterComboBox.Mask

// BeginCode
{
This example uses a filter combo box and a file list box on
a form. When the user selects a filter in the filter combo
box, the file list box displays only files which match the
selected mask:
} 
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;
// EndCode
// EndExample: FilterComboBoxFilter
end.
