Captions: IVZItemsNames;
Captions: Prognoz.Platform.Interop.Visualizators.VZItemsNames;
The Captions property determines labels for bubble tree elements.
Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier containing bubble tree. Display collection of labels to the bubble tree elements.
Add links to the Metabase, Express, Visualizators system assemblies. This procedure should be called from the Main entry point.
Sub UserProc;
Var
Metabase: IMetabase; // Repository
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
i: Integer; // Loop counter
AllKeys: IVZStringArray;
Key, Captions: String;
Begin
// Get repository object
Metabase := MetabaseClass.Active;
// Get express report object
EaxAnalyzer := Metabase.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get all label keys
AllKeys := BubbleTree.Captions.AllKeys;
// Display collection of labels to bubble tree elements
For i:=0 To AllKeys.Count-1 Do
Key := AllKeys.Item(i);
Captions := BubbleTree.Captions.Item(Key);
BubbleTree.Captions.Item(Key) := Captions;
Debug.WriteLine(Captions);
End For;
End Sub UserProc;
After executing the example the console displays labels to the bubble tree elements:
Belgorodskaya Oblast
Kirovskaya Oblast
Tulskaya Oblast
Vladimirskaya Oblast
...
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;
…
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase; // Repository
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
i: Integer; // Loop counter
AllKeys: IVZStringArray;
Key, Captions: String;
Begin
// Get repository object
Metabase := Params.Metabase;
// Get express report object
EaxAnalyzer := Metabase.ItemById["EXPRESS_REPORT"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get all label keys
AllKeys := BubbleTree.Captions.AllKeys;
// Display collection of labels to the bubble tree elements
For i:=0 To AllKeys.Count-1 Do
Key := AllKeys.Item[i];
Captions := BubbleTree.Captions.Item[Key];
BubbleTree.Captions.Item[Key] := Captions;
System.Diagnostics.Debug.WriteLine(Captions);
End For;
End Sub;
See also: