TXTextControl.Selection Object

Describes and handles the position and length of a text selection. It also provides the possibility to replace the currently selected text with text in a certain document format.

Introduced: 24.0.


    getBounds: <function>,
    getCulture: <function>,
    getBold: <function>,
    getBaseline: <function>,
    getFontName: <function>,
    getFontSize: <function>,
    getForeColor: <function>,
    getFormattingStyle: <function>,
    getItalic: <function>,
    getStrikeout: <function>,
    getText: <function>,
    getTextBackColor: <function>,
    getUnderline: <function>,
    setBounds: <function>,
    setCulture: <function>
    setBold: <function>,
    setBaseline: <function>,
    setFontName: <function>,
    setFontSize: <function>,
    setForeColor: <function>,
    setFormattingStyle: <function>,
    setItalic: <function>,
    setStrikeout: <function>,
    setText: <function>,
    setTextBackColor: <function>,
    setUnderline: <function>,
    load: <function>,
    save: <function>,


Property Description
ListFormat Gets a bulleted or numbered list and/or its formatting attributes for the selected text.
ParagraphFormat Gets the formatting attributes of the selected paragraphs.
SectionFormat Gets page settings such as margins, size and orientation for the selected text.


Method Description
getBaseline Gets the baseline alignment, in twips, of the selected text.
getBold Gets the bold attribute of the selected text.
getBounds Takes a callback function with one parameter as a parameter.
getCulture Gets the culture as a languagecode2-country/regioncode2 string value.
getFontName Gets the font of the selected text.
getFontSize Gets the font's size, in points, of the selected text.
getForeColor Gets the color used to display the selected text.
getFormattingStyle Gets the formatting style of the selected text.
getItalic Gets the italic attribute of the selected text.
getStrikeout Gets the strikeout attribute of the selected text.
getText Gets the currently selected text.
getTextBackColor Gets the background color of the selected text.
getUnderline Gets the underlining styles of the selected text.
load For a detailed description of this function see loadSelection.
save For a detailed description of this function see saveSelection.
setBaseline Sets the selection's baseline alignment in twips.
setBold Sets the selection's bold property.
setBounds Sets the selection start and length.
setCulture Sets the selection culture.
setFontName Sets the selection's font by the name of font families.
setFontSize Sets the selection's fontsize in points.
setForeColor Sets the selection's foreground color.
setFormattingStyle Sets the selection's formatting style.
setItalic Sets the selection's italic attribute.
setStrikeout Sets the selection's strikeout attribute.
setText Sets the selection's text.
setTextBackColor Sets the selection's background color.
setUnderline Sets the selection's underline style.

See Also