SetTextStyle
PowerScript function
Description
Specifies the text formatting for selected text in a RichTextEdit
control. You can make the text bold, underlined, italic, and struck out.
You can also make it either a subscript or superscript.
Applies to
RichTextEdit controls
Syntax
|
1 |
rtename.SetTextStyle ( bold, underline {, subscript} {, superscript}, italic, strikeout ) |
|
Argument |
Description |
|---|---|
|
rtename |
The name of the RichTextEdit control in which you want to |
|
bold |
A boolean value specifying whether the selected text is |
|
underline |
A boolean value specifying whether the selected text is |
|
subscript (obsolete) |
Maintained for backward compatibility only. A boolean |
|
superscript (obsolete) |
A boolean value specifying whether the selected text is a |
|
italic |
A boolean value specifying whether the selected text is |
|
strikeout |
A boolean value specifying whether the selected text is |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs.
Examples
This example makes selected text in the RichTextEdit rte_1 bold and
italic:
|
1 2 |
rte_1.SetTextStyle(TRUE, FALSE, & TRUE, FALSE) |
This example makes the selected text italic but keeps other text
formatting as it was:
|
1 2 3 4 |
rte_1.SetTextStyle(rte_1.GetTextStyle(Bold!), & rte_1.GetTextStyle(Underlined!), & TRUE, rte_1.GetTextStyle(Strikeout!)) |
See also