SortingMode: VisualizatorSortingMode;
The SortingMode property determines a mode of sorting territory info elements.
To determine a mode of selecting territory info elements, use IVZTerritoryTranscript.SelectEvent.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing a map.
Add links to the Drawing, Express, Metabase, Visualizators system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
MC: IVZMapChart;
TT: IVZTerritoryTranscript;
Color: IGxColor;
Begin
// Get the current repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get map
MC := Express.MapChart.MapChart;
// Get territory info
TT := MC.TerritoryTranscript;
// Enable territory info
TT.Visible := True;
// Set the number of columns in info
TT.ColumnsCount := 2;
// Decrease map scale
TT.IsOverlap := False;
// Set maximum number of elements in info
TT.MaxItemsCount := 10;
// Change element font color
Color := New GxColor.CreateRGB(120, 0, 120);
TT.ItemsStyle.FontColor := Color;
// Change sorting mode - ascending
TT.SortingMode := VisualizatorSortingMode.Asc;
// Change element selection mode - on mouse click
TT.SelectEvent := VisualizatorTerritoryTranscriptSelectEvent.SelectOnClick;
// Display name of info parent layer in the console
Debug.WriteLine("Name of info parent layer - " + TT.ParentLayer.Name);
// Save changes
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example territory info changes are applied. The console displays name of info parent layer.
See also: