Filters: IMetabaseDialogFilters;
The Filters property returns the filters collection of a combined filter.
Executing the example requires a form with the Button1 button and the MetabaseOpenDialog component named MetabaseOpenDialog1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MetaclassFilter: IMetabaseDialogMetaclassFilter;
ClassFilter: IMetabaseDialogClassFilter;
CombiFilter: IMetabaseDialogCombiFilter;
Filters: IMetabaseDialogFilters;
Begin
//Filter for all kinds of dictionaries
MetaclassFilter := New MetabaseDialogMetaclassFilter.Create;
MetaclassFilter.Description := "All dictionaries";
MetaclassFilter.ObjectMetaclass := MetabaseObjectMetaclass.DIMENSION_CLASS;
//Filter for standard cubes
ClassFilter := New MetabaseDialogClassFilter.Create;
ClassFilter.Description := "Standard cubes";
ClassFilter.ObjectClass := MetabaseObjectClass.KE_CLASS_STDCUBE;
//Combined filter
CombiFilter := New MetabaseDialogCombiFilter.Create;
Filters := CombiFilter.Filters;
Filters.AddFilter(MetaclassFilter);
Filters.AddFilter(ClassFilter);
//Link combined filter in component
MetabaseOpenDialog1.Filters.AddFilter(CombiFilter);
MetabaseOpenDialog1.Execute(Self);
End Sub Button1OnClick;
After executing the example three filters are created after clicking the button:
Filter that displays all kinds of repository dictionaries in the dialog box.
Filter that displays standard cubes of repository in the dialog box.
Combined filter that includes both previous filters.
Combined filter is included into filter list of the MetabaseOpenDialog1 component.
See also: