Softelvdm.Controls Class Library for Windows Controls 1.0

TextPartClass Constructor

Softel vdm, Inc.

Initializes a new instance of the TextPartClass class.

Syntax      TextPartClass Class (Softelvdm.Controls)

VB   

Public Sub New()
Public Sub New( ByVal Text As String )
Public Sub New( _
     ByVal Text As String, _
     ByVal TextStyle As LineStyleEnum, _
     ByVal HAlign As HAlignmentOptionalEnum, _
     ByVal VAlign As VAlignmentOptionalEnum, _
     ByVal ForeColor As Color, _
     ByVal BackColor As Color, _
     ByVal ForeColorSelected As Color, _
     ByVal BackColorSelected As Color, _
     ByVal TextFont As Font, _
     ByVal Format As StringFormatFlags )

C#   

public TextPartClass();
public TextPartClass( string Text );
public TextPartClass(
     string Text,
     LineStyleEnum TextStyle,
     HAlignmentOptionalEnum HAlign,
     VAlignmentOptionalEnum VAlign,
     Color ForeColor,
     Color BackColor,
     Color ForeColorSelected,
     Color BackColorSelected,
     Font TextFont,
     StringFormatFlags Format );

C++   

public: TextPartClass();
public: TextPartClass( String^ Text );
public: TextPartClass(
     String^ Text,
     LineStyleEnum TextStyle,
     HAlignmentOptionalEnum HAlign,
     VAlignmentOptionalEnum VAlign,
     Color ForeColor,
     Color BackColor,
     Color ForeColorSelected,
     Color BackColorSelected,
     Font^ TextFont,
     StringFormatFlags Format );

BackColor

Defines the string's background color (BackColor property).

BackColorSelected

Defines the string's background color, when the containing item or cell is selected (BackColorSelected property).

ForeColor

Defines the string's foreground color (ForeColor property).

ForeColorSelected

Defines the string's foreground color, when the containing item or cell is selected (ForeColorSelected property).

Format

Defines display and layout information to render the string (Format property).

StringFormatFlags

Value

Description

DirectionRightToLeft

1

Text is displayed from right to left.

DirectionVertical

2

Text is vertically aligned.

FitBlackBox

4

Parts of characters are allowed to overhang the string's layout rectangle. By default, characters are repositioned to avoid any overhang.

DisplayFormatControl

32

Control characters such as the left-to-right mark are shown in the output with a representative glyph.

NoFontFallback

1024

Fallback to alternate fonts for characters not supported in the requested font is disabled. Any missing characters are displayed with the fonts missing glyph, usually an open square.

MeasureTrailingSpaces

2048

Includes the trailing space at the end of each line. By default the boundary rectangle returned by the MeasureString method excludes the space at the end of each line. Set this flag to include that space in measurement.

NoWrap

4096

Text wrapping between lines when formatting within a rectangle is disabled. This flag is implied when a point is passed instead of a rectangle, or when the specified rectangle has a zero line length.

LineLimit

8192

Only entire lines are laid out in the formatting rectangle. By default layout continues until the end of the text, or until no more lines are visible as a result of clipping, whichever comes first. Note that the default settings allow the last line to be partially obscured by a formatting rectangle that is not a whole multiple of the line height. To ensure that only whole lines are seen, specify this value and be careful to provide a formatting rectangle at least as tall as the height of one line.

NoClip

16384

Overhanging parts of glyphs, and unwrapped text reaching outside the formatting rectangle are allowed to show. By default all text and glyph parts reaching outside the formatting rectangle are clipped.

HAlign

Defines the horizontal alignment (HAlign property) within the part's available space.

HAlignmentOptionalEnum

Value

Description

Left

0

The contents are left aligned within the available space.

Center

1

The contents are centered within the available space.

Right

2

The contents are right aligned within the available space.

Default

-1

The default value is determined by a containing object or by the environment.

Text

Defines the Text property.

TextFont

Defines the font used to render the string (Font property).

TextStyle

Defines the TextStyle property.

LineStyleEnum

Value

Description

NoWrap

0

The text will not wrap around and use only explicit line breaks.

Wordwrap

1

The text will automatically word-wrap and allows explicit line breaks.

VAlign

Defines the vertical alignment (VAlign property) within the part's available space.

VAlignmentOptionalEnum

Value

Description

Top

0

The contents are aligned with the top of the available space.

Center

1

The contents are vertically centered within the available space.

Bottom

2

The contents are aligned with the bottom of the available space.

Default

-1

The default value is determined by a containing object or by the environment.

Comments

The TextPartClass constructor initializes a new instance of the TextPartClass class.

Version Information

Supported in version 1.0.
Products Table


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com