AddFilter(Filter: IMetabaseDialogFilter): Integer;
Filter - filter that must be added to the collection.
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.
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 the dialog box.
See also: