GetTextStyle – PB Docs 2017

GetTextStyle

PowerScript function

Description

Finds out whether selected text has text styles (such as bold or
italic) assigned to it.

Applies to

RichTextEdit controls

Syntax

Argument

Description

rtename

The name of the RichTextEdit control in which you
want to find the formatting of selected text.

textstyle

A value of the enumerated datatype TextStyle
specifying the text style you want to check for. Values
are:

Bold!

Italic!

Strikeout!

Subscript!

Superscript!

Underlined!

Return value

Boolean. Returns true if the selected text is formatted with the
specified text style and false if it is not. If textstyle is null,
GetTextStyle returns null.

Usage

Text can be formatted with more than one text style. To test for
different styles, call GetTextStyle more than once.

Examples

A previously defined structure is an instance variable istr_text for
the current window. The structure contains the boolean fields: b_isBold,
b_isItalic, and b_isUnderlined. This example checks whether the selected
text has these styles and stores true or false values in the structure for
each style:

See also

GetTextColor

SetSpacing

SetTextColor

SetTextStyle


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x