TxtPosDesc Object

Build 1501 on 14/Nov/2017  This topic last edited on: 9/May/2012, at 13:02

The TxtPosDesc object provides the description of the content on which is the cursor.

Methods

Tag, style, type

GetType MethodReturns an integer specifying the type of the text at the cursor position.
GetCmdType MethodReturns an a tag type
HasStyle MethodReturns true if the cursor position has an associated style (text or paragraph).
GetIsExpansion MethodReturns true if the text at the cursor position has been generated by the expansion of a style.
GetStyle MethodReturns a gn3ted.Style object describing the text or paragraph style at the cursor position.

Character code, dimensions, position

GetChar MethodReturns the code of the character at the cursor position.
GetCharH MethodReturns the characters' point size in millipoints.
GetCharW MethodReturns the characters' width in millipoints.
GetIsJust MethodReturns true if the text at the cursor position has been generated by the justification (e.g. an hyphen).
GetJustElementType MethodReturns an integer identifying the associated element generated by justification
GetYOfs MethodReturns characters' vertical offset in millipoints.

Font, bold and italics

GetFontCode MethodReturns the code of the characters' font.
GetBold MethodReturns TRUE if the bold font variation is active, otherwise it returns FALSE.
GetItalic MethodReturns true if there's an italic font variation.
GetSlant MethodReturns characters' slant in degrees clockwise.
GetSmall MethodReturns the status of the capitals attribute.

Color and tint

GetColor MethodReturns the name of the characters' color.
GetGray MethodReturns the characters' tint
GetHyp MethodReturns the hyphenation language.
GetKerning MethodReturns kerning between characters in millipoints.

Hidden text

GetMode Method Returns the second parameter of the >rem...< GNML tag.
GetModeData Method Returns the first parameter of the >rem...< GNML tag.
GetRemCode MethodReturns notes mode code, 0 when not in notes mode.

Shadow and outline

GetShadow MethodReturns shadow font variation, and it can be either true = set shadow or false = no shadow.
GetShadowEnlarge MethodReturns the value of the extra character spacing in the shadow.
GetShadowMoveX MethodReturns the value of the x offset in the shadow.
GetShadowMoveY MethodReturns the value of the Y offset in the shadow.
GetOutline MethodReturns TRUE if there's an outline font variation active.
GetSupColor MethodReturns the name of the shadow color or outline fill color.

Underlines

GetNUnderlines MethodReturns the number of defined underlines.
GetUColor MethodReturns the name of the color of the nIdx underline.
GetUFlags MethodReturns options for the nIdx underline.
GetGray MethodReturns tint of the nIdx underline.
GetUH MethodReturns the weight of the nIdx underline.
GetUY MethodReturns the vertical position of the nIdx underline.

To create a TxtPosDesc object:

Dim objCur = Text.GetCursor(modeSrcOn,cposCursor,False)

Dim objdesc As TxtPosDesc = objCur.GetDesc

See also

Example

Cursor object