This document is archived and information here might be outdated. Recommended version. |
Provides access to members that control the scalebar map surrounds.
Name | Description | |
---|---|---|
BarColor | Color used to draw the bar. | |
BarHeight | Height of the bar in points (1/72 inch). | |
DelayEvents | Used to batch operations together to minimize notifications. | |
Division | Number of units in one major division. | |
Divisions | Total number of divisions (including those before zero). | |
DivisionsBeforeZero | Number of divisions to the left of zero. | |
Draw | Draws the map surround into the specified display bounds. | |
FitToBounds | Adjusts the map surround to fit the bounds. The changed argument indicates whether the size of the map surround was changed. | |
Icon | Icon used to represent the map surround. | |
LabelFrequency | The label style indicating which marks are labeled. | |
LabelGap | Vertical gap between the bar and the labels in points (1/72 inch). | |
LabelPosition | Vertical positioning of the mark labels. | |
LabelSymbol | Symbol used to draw the labels. | |
Map | The parent map. | |
Name | Name of the map surround. | |
NumberFormat | Number format. | |
QueryBounds | Returns the bounds of the map surround. | |
Refresh | Makes sure the latest updates are refected the next time the Map Surround is drawn. | |
ResizeHint | Indicates what happens when scale bar is resized. | |
Subdivisions | Number of subdivisions per major division. | |
UnitLabel | The unit label. | |
UnitLabelGap | Gap between the scale bar and the unit label in points (1/72 inch). | |
UnitLabelPosition | Vertical positioning of the unit label. | |
UnitLabelSymbol | Unit label symbol. | |
Units | The units reported. | |
UseMapSettings | Sets division and units based on map. |
Interfaces | Description |
---|---|
IMapSurround | Provides access to members that control the map surround. |
CoClasses and Classes | Description |
---|---|
AlternatingScaleBar | A map surround for displaying a single alternating scale bar. |
DoubleAlternatingScaleBar | A map surround for displaying a double alternating scale bar. |
HollowScaleBar | A map surround for displaying a hollow scale bar. |
ScaleLine | A map surround for displaying a scale line. |
SingleDivisionScaleBar | A map surround for displaying a single division scale bar. |
SteppedScaleLine | A map surround for displaying a stepped scale line. |
The IScaleBar interface manages most of the properties of a scale bar.
Other interfaces relevant to the scale bar's format are IScaleMarks, IScaleLine, ISingleFillScaleBar and IDoubleFillScaleBar. See the Carto Library Overview to find out how these interfaces work together to create various types of scale bars.
BarHeight defines the height of the scale bar and is always expressed in points and BarColor is an IColor defining its color.
ResizeHint is an esriScaleBarResizeHint constant defining what happens when the scale bar is resized. The choices are a fixed scale bar, increasing the space between the division marks or the number of divisions.
Divisions and Subdvisions
The Divisions property controls the total number of divisions on the scale bar including divisions before zero which of course, are defined by the DivisionsBeforeZero property. Unsurprisingly, Subdivisions controls the number of subdivisions. Use IScaleMarks::MarkFrequency to set which divisions and subdivisions will be shown.
Division is expressed in the units the scale bar will show and defines the spacing of the divisions.
Units and Unit Labels
Units is of type esriUnits and defines the units the scale bar will show.
UnitLabel is a string that will be displayed to show this unit. For instance "Km".
The UnitLabelPosition is an esriVertPosEnum constant that defines the position of the label relatively to the line. UnitLabelGap defines the space in points between the label and the scale bar and UnitLabelSymbol is a text symbol used to display the label.
UseMapSettings will restore Units and UnitLabel in accordance with map units.
Division Labels
The LabelFrequency is an esriScaleBarFrequency constant that defines on which divisions and subdivisions labels will be shown.
NumberFormat is an INumberFormat that allows you for instance to modify the number of decimals used to display the labels.
The LabelPosition is an esriVertPosEnum constant that defines the position of the labels relatively to the line. LabelGap defines the space in points between the labels and the scale bar and LabelSymbol is a text symbol used to display the labels.