ExtendedRootItem: Boolean;
The ExtendedRootItem property determines whether the combined element is displayed in the component.
If the property is set to True, a combined element is displayed. The combined element includes a button for clearing the breadcrumb and an additional button with the text determined in the RootText property. The RootHint property may be used to set the text of a tooltip for additional button. Clicking the additional button generates the OnRootClick event for the component.
Executing the example requires a form, the MetaAttributesBreadcrumb component on the form and named MetaAttributesBreadcrumb1 and the MetabaseOpenDialog component named MetabaseOpenDialog1. The filter that is used to select only time series databases is specified for the MetabaseOpenDialog1 component. The repository must contain a time series database with the FC identifier.
Class TESTForm: Form
MetaAttributesBreadcrumb1: MetaAttributesBreadcrumb;
MetabaseOpenDialog1: MetabaseOpenDialog;
Sub TESTFormOnCreate(Sender: Object; Args: IEventArgs);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("FC");
MetaAttributesBreadcrumb1.Rubricator := MDesc.Open(Null) As IRubricatorInstance;
MetaAttributesBreadcrumb1.ExtendedRootItem := True;
MetaAttributesBreadcrumb1.RootText := Base: + MDesc.Name;
MetaAttributesBreadcrumb1.RootHint := MDesc.Name;
End Sub TESTFormOnCreate;
Sub MetaAttributesBreadcrumb1OnRootClick(Sender: Object; Args: IBreadcrumbItemEventArgs);
Var
MDesc: IMetabaseObjectDescriptor;
Begin
If MetabaseOpenDialog1.Execute(Self) Then
MDesc := MetabaseOpenDialog1.Object;
MetaAttributesBreadcrumb1.Rubricator := MDesc.Open(Null) As IRubricatorInstance;
MetaAttributesBreadcrumb1.RootText := Base: + MDesc.Name;
MetaAttributesBreadcrumb1.RootHint := MDesc.Name;
End If;
End Sub MetaAttributesBreadcrumb1OnRootClick;
End Class TESTForm;
The MetaAttributesBreadcrumb1 component is connected to the specified time series database when the form is launched. The root element is also displayed in the component. The name of time series database is specified in the text of the element. The dialog box for selection of time series database from repository appears on clicking the root element. The selected database is linked to the MetaAttributesBreadcrumb1 component.
See also:
IMetaAttributesBreadcrumb | IMetaAttributesBreadcrumb.RootText | IMetaAttributesBreadcrumb.RootHint