ResetFormats;
The ResetFormats method resets settings for legend elements.
To set up legend elements, use the properties:
Executing the example requires a form with the following components: the Button component named Button1, the MapBox component named MapBox1, and the UiMap component named UiMap1. UiMap1 is a data source for MapBox1. The express report with a map containing the layer with the EOmap identifier is used as a data source.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Express, ExtCtrls, Forms, and Map system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Map: IMap;
Layer: IMapLayer;
Legend: IMapLegend;
Begin
Map := UiMap1.Map;
Legend := New DxMapLegend.Create As IMapLegend;
Layer := Map.Layers.FindByName("EOmap");
Legend.Visual := Layer.Visuals.Item(0) As IMapVisual;
Legend.ResetFormats;
End Sub Button1OnClick;
After executing the example standard settings of labels format are returned for the map legend.
See also: