Description

The Label for each of the McGraphObj instances is displayed or cleared.

Return Type

None  

Syntax

object.SetLabelText bstrLabelTextOrKeyword, [mcsltFlags], [lTextColor], [varIFontDisp]

The SetLabelText Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDisplayedObjects.
bstrLabelTextOrKeywordRequired. A String value.
mcsltFlagsOptional. A mcSetLabelTextFlags enumeration, as described in settings.

setting the TextColor. If -1 and neither the mcsltCopyBorderColor nor mcsltCopyFillColor mcsltFlags are given, then the label color is left alone.

lTextColorOptional. A Long value.

If not -1 (the default), then this is the TextColor property to set for the labels. Any value other than -1 will override any

varIFontDispOptional. A Variant value.

If given, a standard IFontDisp interface instance that describes the font to use for the text display. If not given, the default font for the label text is used.

Settings

The settings for mcsltFlags are:

ConstantValueDescription
 mcsltNoFlags0

No flags

 mcsltDisplayFeatureIndex1

If set, include the index with %d

 mcsltDisplayFeatureID2

If set, include the McFeature.Identifier with d or x

 mcsltDisplaySourceData3

If set, include the McFeature.SourceData with s if it is a string or with f or g if it is a floating point type or with d or %x otherwise. Since you can assign a separate value to each feature's SourceData property, this choice allows you to assign an arbitrarily different label to each feature.

 mcsltDisplayGraphID4

If set, include the McGraphObj ID with d or x

 mcsltDisplaySourceFlags5

If set, include the McFeature.SourceFlags with %d. Since you can assign a separate value to each feature's SourceFlags property, this choice allows you to assign an different integer label to each feature. The SourceFlags property can be assigned from an array, making it convenient to set values for all features in one assignment.

 mcsltDisplayNumberMask15

Mask for the display number flags

 mcsltCopyBorderColor16

if set, set TextColor to Feature BorderColor

 mcsltCopyFillColor32

if set, set TextColor to Feature FillColor

 mcsltTextColorMask48

Mask for the TextColor control bits

 mcsltLabelTopleft1048576

Object has a top left label attached.

 mcsltLabelTopright2097152

Object has a top right label attached.

 mcsltLabelBtmleft4194304

Object has a bottom left label attached.

 mcsltLabelBtmright8388608

Object has a bottom right label attached.

 mcsltLabelCenter16777216

Object has a bottom center label attached.

 mcsltLabelLinebgn33554432

Display the label underneath the object.

 mcsltLabelLineend67108864

Display the label near the last point of the object.

 mcsltLabelInside134217728

The label is shown inside rather than outside the specified position. For mcsltLabelCenter, mcsltLabelLinebgn and mcsltLabelLineend, the position is moved to the other side of the specified position.

 mcsltLabelHidden268435456

The label is hidden, but not destroyed.

 mcsltLabelPositionMask267386880

Mask for the label position flags, one must be set to display a label

 mcsltLabelStyleMask535822336

Mask for the label position and hidden flags

 mcsltDefault16777233

include the Feature Indexwith %d, set TextColor to Feature BorderColor and Object has a bottom center label attached

Remarks

With a single call to this method, the label text can be set as well as the label position and the label text color.