Table of Contents

Class PmpLabel

Namespace
Hymma.Solidworks.Addins
Assembly
Hymma.Solidworks.Addins.dll

a lable inside a property manager page

public class PmpLabel : PmpTextBase<PropertyManagerPageLabel>, IWrapSolidworksObject<PropertyManagerPageLabel>, IReleaseSolidworksObject
Inheritance
PmpControl<PropertyManagerPageLabel>
PmpTextBase<PropertyManagerPageLabel>
PmpLabel
Implements
IWrapSolidworksObject<PropertyManagerPageLabel>
Inherited Members

Constructors

PmpLabel(string, LabelStyles)

default constructor

public PmpLabel(string text, LabelStyles style = LabelStyles.LeftText)

Parameters

text string

text of this lable

style LabelStyles

style of the lable as defined by bitwie LabelStyles

Properties

Style

style as defined by LabelStyles

public LabelStyles Style { get; set; }

Property Value

LabelStyles

Methods

GetItalic(short, short)

gets whether a pecified range of characters in this property manager label are italic or not

public bool GetItalic(short StartChar, short EndChar)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

Returns

bool

SetBackgroundColor(short, short, Color)

sets the background color for the specified range of characters in this PropertyManager label.

public void SetBackgroundColor(short StartChar, short EndChar, Color color)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

color Color

value for the text background color for the specified characters; if not specified, then the background color for this control is used

SetBold(short, short, bool)

sets the range of specified characters to bold.

public void SetBold(short start, short end, bool status)

Parameters

start short

0-based start index

end short

0-based end index

status bool

bold status

SetCharacterColor(short, short, Color)

sets the color of the specified characters in this PropertyManager label.

public void SetCharacterColor(short StartChar, short EndChar, Color color)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

color Color

value for the text color for the specified characters;

SetFont(short, short, string)

sets the font for the specified characters in this PropertyManager label.

public void SetFont(short StartChar, short EndChar, string font)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

font string

Name of the font to use for the specified characters

SetItalic(short, short, bool)

sets whether to italicize the specified range of characters in this PropertyManager label.

public void SetItalic(short StartChar, short EndChar, bool status)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

status bool

SetLineOffset(short, short, double)

Sets whether to raise or lower the specified characters above or below their baselines, relative to their heights, in this PropertyManager label.

public void SetLineOffset(short StartChar, short EndChar, double offset)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

offset double

Specify:
0.0 to show the character on its baseline
-1.0 to show the character 1 character below its baseline
+1.0 to show the character 1 character above its baseline

Remarks

allows you to show that character as a subscript or exponent in an equation.

SetSizeRatio(short, short, double)

Gets or sets the size of the specified characters in this PropertyManager label.

public void SetSizeRatio(short StartChar, short EndChar, double ratio)

Parameters

StartChar short

0-based index value of start character

EndChar short

0-based index value of end character

ratio double

Ratio for the height of the characters relative to their expected heights >0 increases their heights and <0 decreases their height

SetUnderLineStyle(short, short, UnderLineStyles)

Sets whether to apply the specified underline style to the specified range of characters in this PropertyManager label.

public void SetUnderLineStyle(short StartChar, short EndChar, UnderLineStyles style)

Parameters

StartChar short
EndChar short
style UnderLineStyles

UnsubscribeFromEvents()

unsubscribes all event handlers

public override void UnsubscribeFromEvents()

Events

Displaying

raised a moment before this label is displayed in the property manager page

public event EventHandler<PmpLabelDisplayingEventArgs> Displaying

Event Type

EventHandler<PmpLabelDisplayingEventArgs>