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.
Controls
RichTextEdit controls
Syntax
|
1 |
<span>rtename</span>.<span>SetTextStyle</span> ( <span>bold</span>, <span>underline</span>, {<span>subscript</span>}, {<span>superscript</span>}, <span>italic</span>, <span><br> strikeout</span> ) |
|
Argument |
Description |
|---|---|
|
rtename |
The name of the RichTextEdit control |
|
bold |
A boolean value specifying whether the |
|
underline |
A boolean value specifying whether the |
|
subscript (obsolete) |
Maintained for backward compatibility |
|
superscript (obsolete) |
A boolean value specifying whether the |
|
italic |
A boolean value specifying whether the |
|
strikeout |
A boolean value specifying whether the |
Return Values
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 |
rte_1.<span>SetTextStyle</span>(TRUE, FALSE, & |
|
1 |
TRUE, FALSE) |
This example makes the selected text italic but keeps
other text formatting as it was:
|
1 |
rte_1.<span>SetTextStyle</span>(rte_1.GetTextStyle(Bold!), & |
|
1 |
rte_1.GetTextStyle(Underlined!), & |
|
1 |
TRUE, rte_1.GetTextStyle(Strikeout!)) |