AddFilter(Filter: IMetabaseDialogFilter): Integer;
Filter. Filter to 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 button named Button1 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. If this filter is used, all repository tables are displayed in the dialog box.
See also: