RichTextEdit control
A RichTextEdit control contains a document that it displays as
formatted text. It can include input fields that are linked to a
DataWindow control. When a DataWindow’s data is shared with the
RichTextEdit control, there is one instance of the document in the control
that can be displayed multiple times with different occurrences of row
data. Input fields whose names match columns in the DataWindow are filled
with data from the current row.
RichText editors
You can select from the three rich text editors supported by
Appeon PowerBuilder. The selected rich text editor will be applicable to
the RichTextEdit control, the RichText DataWindow object, and the
RichText edit style. For more information about the rich text editors,
see the section called “Rich text editors” in Application Techniques; and for feature difference of the rich
text editor, see the section called “Feature difference between TE Edit Control and TX Text
Control” in Application Techniques.
Using with animation features
RichTextEdit controls may not paint correctly when you use
animation features.
Properties
|
RichTextEdit property |
Datatype |
Description |
|---|---|---|
|
Integer |
Specifies the ASCII value of the accelerator key |
|
|
String |
A description of the control and/or its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Long |
Specifies the numeric value of the background color |
|
|
Boolean |
Specifies whether the control has a border. Values TRUE — Has a border. FALSE — Does |
|
|
BorderStyle (enumerated) |
Specifies the style of the border of the control. StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Long |
Specifies the width of the bottom margin on the |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to TRUE — Moves it to the top. FALSE |
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether control characters (carriage TRUE — Control characters are FALSE — Control characters are |
|
|
Boolean |
Specifies whether users can make changes to the TRUE — The content, including FALSE — The user can edit the |
|
|
String |
Specifies the name that displays in the print queue |
|
|
Boolean |
(Obsolete) This property is no longer supported by Specifies whether PowerBuilder puts the TRUE — When the control is clicked, the FALSE — When |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the control is enabled (can be TRUE — Can be FALSE — Cannot be |
|
|
String |
Specifies the typeface used for text in the |
|
|
FontCharSet (enumerated) |
Specifies the character set for text in the |
|
|
FontFamily (enumerated) |
Specifies the font family for text in the |
|
|
FontPitch (enumerated) |
Specifies the spacing of the font used for text in |
|
|
Boolean |
Specifies whether the RichTextEdit control has a TRUE — The control has a header/footer FALSE — The control does not have a If a document has a header or |
|
|
Integer |
Specifies the height of the control, in |
|
|
Boolean |
Specifies whether the RichTextEdit control has a TRUE — A scroll FALSE — A scroll bar does not |
|
|
ImeMode |
Integer |
Specifies the input method editor mode. This |
|
Long |
Specifies default background color for all input Limitation with the new |
|
|
Boolean |
Specifies whether input field names are displayed TRUE — Input fields display their FALSE — Input fields display their |
|
|
Boolean |
Specifies whether input fields are visible. Values TRUE — Input fields are FALSE — Input fields are |
|
|
Boolean |
Specifies default text formatting. Values TRUE — Text displays in italic FALSE — Text displays in standard Maintained for forward compatibility with |
|
|
Long |
Specifies the width of the left margin on the |
|
|
Modified |
Boolean |
Specifies whether the document has been modified TRUE — The document has been FALSE — The document has not been When the first change is made to a newly |
|
Long |
Specifies the value for the display height of pages |
|
|
PaperOrientation(enumerated) |
Specifies the page orientation in the |
|
|
Long |
Specifies the value for the display width of pages |
|
|
Boolean |
(Obsolete) This property is no longer supported by When the value is true, graphics (bitmaps) are |
|
|
String |
Specifies the name of the stock pointer of the file |
|
|
Boolean |
Specifies whether the user has access to a pop-up TRUE — Pop-up menu FALSE — Pop-up menu is |
|
|
Boolean |
Specifies whether the user can resize the control. TRUE — Control is FALSE — Control is not |
|
|
Long |
Specifies the width of the right margin on the |
|
|
Boolean |
Specifies whether a ruler bar is visible above the TRUE — FALSE — Ruler bar is If the RichTextEdit pop-up menu is enabled, |
|
|
Long |
Specifies the starting position in a selected text |
|
|
Long |
Specifies the length of text you want to highlight |
|
|
StatusBar |
Boolean |
Specifies whether a status bar is visible below the TRUE — Status bar is FALSE — Status bar is If the pop-up menu is enabled, the user can |
|
Integer |
Specifies the tab value of the control within the Note that because a RichTextEdit allows |
|
|
String |
Specifies the tag value assigned to the |
|
|
Integer |
Specifies the point size of text in the |
|
|
Boolean |
Specifies whether a tool bar for formatting text is TRUE — FALSE — Tool bar is not If the pop-up menu is enabled, the user can |
|
|
Long |
Specifies the width of the top margin on the |
|
|
Boolean |
Specifies default text formatting. Values TRUE — Text displays with FALSE — Text displays without Maintained for forward compatibility |
|
|
Boolean |
Specifies whether the control is TRUE — Control is FALSE — Control is not |
|
|
Boolean |
Specifies whether the RichTextEdit control has a TRUE — A scroll FALSE — A scroll bar does not |
|
|
Integer |
Specifies default text weight formatting for the |
|
|
Integer |
Specifies the width of the control, in PowerBuilder |
|
|
Boolean |
Determines whether large blocks of text that do not TRUE — Automatic FALSE — Automatic word wrap Limitation with the new control: For the new |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
Events
|
RichTextEdit event |
Occurs |
|---|---|
|
Immediately before the Open event occurs in the |
|
|
Immediately after the Close event occurs in the |
|
|
When the user double-clicks anywhere in the |
|
|
When a dragged control is dropped on the |
|
|
When a dragged control enters the |
|
|
When a dragged control leaves the |
|
|
When a dragged control is within the |
|
|
When the document in the RichTextEdit is saved to a |
|
|
Just before the control receives focus (before it |
|
|
When the user presses the F1 key or drags the |
|
|
When the user selects an input field by |
|
|
When the user presses a key. |
|
|
When the control loses focus (becomes |
|
|
When the first change is made to the contents of In the Modified event script, you can set a |
|
|
When the left or middle mouse button is pressed on |
|
|
When the mouse has moved within the |
|
|
When the left or middle mouse button is released on |
|
|
When a Windows message occurs that is not a |
|
|
When the user selects a picture by clicking |
|
|
When the right mouse button is pressed on the |
|
|
When the right mouse button is released on the |
Functions
|
RichTextEdit function |
Datatype returned |
Description |
|---|---|---|
|
Boolean |
Returns true if there is an editing function that |
|
|
String |
Returns the name assigned to the |
|
|
Long |
Clears selected text (if any) from the control, but |
|
|
Long |
Clears all content from the specified control, but |
|
|
Long |
Copies (but does not delete) the selected contents |
|
|
String |
Copies the selected contents of the RichTextEdit |
|
|
Long |
Cuts (deletes) the selected contents from the |
|
|
Integer |
Associates a DataWindow with the RichTextEdit |
|
|
Integer |
Starts or ends dragging of the |
|
|
Integer |
Finds text in the control. Enhancement |
|
|
Integer |
Finds the next occurrence of text specified with |
|
|
Alignment |
Obtains the alignment of the selected |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
Long |
Gets the size of the indentation, left margin, or |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Spacing |
Obtains the line spacing of the selected |
|
|
Long |
Returns the color of the selected |
|
|
Boolean |
Obtains font settings for the selected |
|
|
Integer |
Makes the control invisible. |
|
|
Integer |
Modifies the data value for all input fields of the |
|
|
String |
Gets the name of the selected input |
|
|
Integer |
Deletes the current occurrence of the selected |
|
|
String |
Obtains the data in the specified input |
|
|
Integer |
Inserts the named input field at the insertion |
|
|
String |
Locates an input field. You can find any occurrence |
|
|
Integer |
Inserts the named file in the RichTextEdit control. |
|
|
Integer |
Inserts the specified bitmap or picture file at the The inserted WMF image file will |
|
|
Boolean |
Checks whether the RichTextEdit control is in |
|
|
Integer |
Returns the total number of lines in the |
|
|
Integer |
Returns the length of the current |
|
|
Integer |
Moves the control to a specified |
|
|
Integer |
Returns the number of pages in the |
|
|
Integer |
Inserts the contents of the clipboard (if any) at |
|
|
Long |
Inserts a string at the insertion point when the |
|
|
Integer |
Returns the distance of the pointer from the left |
|
|
Integer |
Returns the distance of the pointer from the top of |
|
|
Integer |
Returns the position of the insertion point or |
|
|
Integer |
Adds the specified event to the end of the event |
|
|
Integer |
Flips between Preview of the document (where |
|
|
Integer |
Prints the contents of the control. You can specify |
|
|
Integer |
Prints the contents of the control. You can specify |
|
|
Integer |
Replaces selected text with given string. If no Limitation with the new control: In the |
|
|
Integer |
Changes the size of the control. |
|
|
Integer |
Saves the current document in a file in either rich When saving multi-byte characters to a TXT Limitation with the new control: In the |
|
|
Integer |
Scrolls the RichTextEdit the specified direction |
|
|
Integer |
Scrolls forward to the next page in the |
|
|
Long |
Scrolls the RichTextEdit to the next row and |
|
|
Long |
Scrolls back to the prior page in the RichTextEdit |
|
|
Long |
Scrolls the RichTextEdit to the prior row and |
|
|
Long |
Causes the control to scroll to the specified row |
|
|
Integer |
Returns the number of the character column just |
|
|
Long |
Returns the length of the selected |
|
|
Long |
Returns the number of the line in which the |
|
|
Long |
Returns the number of the page in which the Limitation with the new control: For the |
|
|
Integer |
Returns the starting position of the selected text |
|
|
String |
Returns a string containing the selected text from |
|
|
Long |
Selects text in the RichTextEdit |
|
|
Integer |
Selects all text in the control. |
|
|
Integer |
Selects all text in the line in which the insertion |
|
|
Integer |
Selects the word in which the insertion point is |
|
|
Integer |
Sets the alignment for the selected |
|
|
Integer |
Sets focus to the RichTextEdit |
|
|
Integer |
Specifies the size of the paragraph’s indentation, |
|
|
Integer |
Specifies the control’s position in the |
|
|
Integer |
Controls automatic redrawing of the |
|
|
Integer |
Sets the line spacing for the selected |
|
|
Integer |
Sets the color of the selected text. |
|
|
Integer |
Sets the font properties of the selected |
|
|
Integer |
Makes the RichTextEdit control |
|
|
Integer |
Allows editing of the header and footer in the |
|
|
String |
Returns the entire text of the line in which the |
|
|
Integer |
Triggers a specified event in the control and |
|
|
Object |
Returns the type of the control. |
|
|
Integer |
Cancels the previous editing function performed in |