Compartir a través de


GDI Plus StringFormat Foundation Class

The gpStringFormat class provides an object encapsulating text layout information (such as alignment and line spacing) and display manipulations (such as ellipsis insertion and national digit substitution).

Category

Reporting

Default Catalog

Visual FoxPro Catalog\Foundation Classes\Output\GDIplus

Class

gpStringFormat

Base Class

Custom

Class Library

_GDIPLUS.vcx

Parent Class

gpObject (GDI Plus Object Foundation Class)

Remarks

The following table lists public properties and methods added by this class to its parent class, gpObject. This class also implements the Clone and Init methods.

Properties and methods

Description

Alignment Property

Text horizontal alignment specified using values indicated by GDIPLUS_STRINGALIGNMENT_* constants.

Default: GDIPLUS_STRINGALIGNMENT_Near.

Remarks: In a left-to-right reading order environment, GDIPLUS_STRINGALIGNMENT_Near is equivalent to "left alignment," and GDIPLUS_STRINGALIGNMENT_Far is equivalent to "right alignment."

Clone Method

Clones a StringFormat object.

Syntax: ? THIS.Clone(toGpStringFormat)

Return Values: Logical, representing success or failure.

Parameters: 

toGpStringFormat, required, the gpStringFormat-based object to clone.

Create Method

Creates a StringFormat object with optional flags and language information.

Syntax: THIS.Create([tnFlags[, tnLangID]])

Return Values: Logical, representing success or failure.

Parameters: 

tnFlags, optional, initial value for the FormatFlags property.

tnLangID, optional, an integer language identifier.

FormatFlags Property

String formatting flags specified using a combination of bit values, using values defined by GDIPLUS_STRINGFORMATFLAGS_* constants.

Default: Empty.

GetGenericDefault Method

Constructs a StringFormat object equivalent to .NET's System.Drawing.StringFormat.GenericDefault.

Syntax: THIS.GetGenericDefault(tlMakeClone)

Return Values: Logical, representing success or failure.

Remarks: Upon successful return from this method the object represents a system standard string format, and all properties become read-only.

GetGenericTypographic Method

Constructs a StringFormat object with Generic Typographic properties set as they would be by .NET's System.Drawing.StringFormat. GenericTypographic.

Syntax: THIS.GetGenericTypographic(tlMakeClone)

Return Values: Logical, representing success or failure.

Remarks: Upon successful return from this method the object represents a system standard string format, and all properties become read-only.

HotkeyPrefix Property

HotkeyPrefix setting with values indicated by GDIPLUS_HOTKEYPREFIX_* constants.

Init Method

Constructs a StringFormat object during initialization if passed appropriate arguments.

Syntax: CREATEOBJECT("gpStringFormat" [, tnFlags[, tnLangID]])

Return Values: Logical, representing success or failure. If the method fails, the object does not instantiate.

Parameters: 

tnFlags, optional, initial value for the FormatFlags property.

tnLangID, optional, an integer language identifier.

LineAlignment Property

Text line vertical alignment specified using values indicated by GDIPLUS_STRINGALIGNMENT_* constants.

Default: GDIPLUS_STRINGALIGNMENT_Near.

Remarks: In a top-to-bottom reading order environment, GDIPLUS_STRINGALIGNMENT_Near is equivalent to "top alignment," and GDIPLUS_STRINGALIGNMENT_Far is equivalent to "bottom alignment."

Trimming Property

Flags that specify how text is trimmed when it overflows the layout rectangle, using values indicated by GDIPLUS_STRINGTRIMMING_* constants.

Default: GDIPLUS_STRINGTRIMMING_None.

See Also

Concepts

Guidelines for Using Visual FoxPro Foundation Classes

Reference

Visual FoxPro Foundation Classes A-Z

GDI Plus API Wrapper Foundation Classes