SetTextStyle Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:19

Description

Sets the text style of the selected text, passing the Style object as parameter.

Note: it won't display the dialog box for the variable text style. Use TxtStyle instead.

Syntax

Text.SetTextStyle (obj1)

obj1        

Style object describing the style to set

Return value

Error code

Example

This example applies the character style with the tag name "up" to the selected text.

Dim objStyle = Text.GetTextStyle

Objstyle.name = "up"

Text.SetTextStyle(objstyle) 

Note: with this command you cannot apply a style by its style name, but only by its tag name. See TxtStyle to apply a style by its style name.

Context

Text designer commands

See also

SetStyle

TestTextStyle