ShowLeafFactors: Boolean;
The ShowLeafFactors property determines whether tree elements are shown.
Available values:
True. Tree displays attribute hierarchy and elements.
False. Tree displays only attribute hierarchy.
The MetaAttributesTreeList component example with the set value of the ShowLeafFactors property - True (to the left) and False (to the right):
Executing the example requires a form with a button with the Button1 identifier, the MetaAttributesBreadcrumb and the MetaAttributesTreeList components with the MetaAttributesBreadcrumb1 and the MetaAttributesTreeList1 identifiers. Time series database with the OBJ_FC identifier must be located in repository. Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
mb: IMetabase;
rubDescr: IMetabaseObjectDescriptor;
dict: IMetaDictionary;
dictInst: IMetaDictionaryInstance;
rub: IRubricator;
rubInst: IRubricatorInstance;
Begin
mb := MetabaseClass.Active;
rubDescr := mb.ItemById("OBJ_FC");
rub := rubDescr.Bind As IRubricator;
rubInst := rubDescr.Open(Null) As IRubricatorInstance;
dictInst := rubInst.GetDictionary(RubricatorDictionary.Facts);
If dictInst <> Null Then
dict := (dictInst As IMetabaseObjectInstance).Object As IMetaDictionary;
MetaAttributesTreeList1.Dictionary := dict;
MetaAttributesTreeList1.ShowLeafFactors := False;
MetaAttributesTreeList1.Breadcrumb := MetaAttributesBreadcrumb1;
MetaAttributesBreadcrumb1.Dictionary := dictInst;
MetaAttributesBreadcrumb1.MetaAttributes := dict.Attributes;
End If;
End Sub Button1OnClick;
After executing the example, the attribute, that determines the time series database tree hierarchy, that is displayed in the MetaAttributesTreeList component, can be selected in the MetaAttributesBreadcrumb component. The tree displays only attributes hierarchy.
See also: