IMetabaseDialogFilters.AddFilter

Syntax

AddFilter(Filter: IMetabaseDialogFilter): Integer;

Parameters

Filter is the filter that has to be added to the collection.

Description

The AddFilter method adds the filter that is passed by the Filter input parameter to the collection, then the method returns index of the added filter.

Example

Executing the example requires a form with the Button1 button and the MetabaseOpenDialog component named MetabaseOpenDialog1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Filter: IMetabaseDialogClassFilter;

Begin

Filter := New MetabaseDialogClassFilter.Create;

Filter.Description := "Tables";

Filter.ObjectClass := MetabaseObjectClass.KE_CLASS_TABLE;

MetabaseOpenDialog1.Filters.AddFilter(Filter);

MetabaseOpenDialog1.Execute(Self);

End Sub Button1OnClick;

After executing the example, pressing the button adds a new filter to a list of the MetabaseOpenDialog1 component filters. When using this filter all tables of the repository are displayed in a dialog.

See also:

IMetabaseDialogFilters