GetRichTextStyle – PB Docs 150

GetRichTextStyle method (DataWindows)

Description

Determines whether
selected text or text at the cursor in a RichText column has a specified
formatting.

Controls

DataWindow control

Syntax

Argument

Description

dwcontrol

A reference to the DataWindow control

style

Value for specifying a text style. Allowable
values are:

  • bold!

  • italic!

  • strikeout!

  • subscript!

  • superscript!

  • underlined!

state

Indicates whether the selected text or
text at the cursor position has a style applied to it

Return Values

Returns an integer to indicate whether the column that you
selected has the RichText edit style and whether the content has
one or more styles applied.

  • 0 Success

  • -1 No RichText column is being edited

  • -2 The selected text is a mix of styles

Usage

You can call this method from a button in a custom toolbar
that you use to obtain the current font settings for columns with
the RichText edit style.

Examples

This example determines whether a bold font is the
current style setting for editing columns with a RichText edit style.

If bold text is selected when the above script is called,
the lb_state argument is true, and the method returns 0.
If mixed text is selected, such as bold and italic, lb_state
is true, and the method returns –2.

See Also


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