The table that follows lists new and modified properties of the PowerBuilder 10.5 RichTextEdit control:
Property |
Datatype |
Description |
---|---|---|
StatusBar |
Boolean |
New property that specifies whether a status bar displays below the editing area of a rich text control. Values are: You can set the value of this property in the painter at design time or in PowerScript at runtime. If the pop-up menu on a rich text control is enabled, end users can turn the status display on or off from the pop-up menu. |
ControlCharsVisible |
Boolean |
New property replacing the following obsolete properties: ReturnsVisible, SpacesVisible, and TabsVisible. It specifies whether control characters are visible in the rich text control. Values are: |
HeaderFooter |
Boolean |
Although this property remains substantially the same as in previous versions of PowerBuilder, setting this to “true” causes the header and footer to display in the same view as the body of the rich text control. (In the previous rich text editor, you could not display the header and footer in the same view with the text body.) You must still set this property at design time only. |
InputFieldBackColor |
Long |
Although this property remains substantially the same as in previous versions of PowerBuilder, the new rich text editor allows a user to override the default background color on individual input fields. The changes that a user makes for an input field in a font properties dialog box do not affect the default background color of other input fields in a rich text document. |
Pointer |
Enumerated value |
The new rich text editor supports most but not all of the stock pointers available in the old rich text editor. The AppStarting!, Help!, and No! pointers are no longer supported. Users can still select one of the following pointers: Arrow!, Cross!, HourGlass!, Hyperlink!, IBeam!, Size!, SizeNESW!, SizeNS!, SizeWE!, SizeNWSE!, SizeWE!, and UpArrow!. If no value (or an unsupported value) is specified, the default pointer is “IBeam!” when the rich text control is editable and “Arrow!” when the control is read-only. |
Obsolete properties The following properties are not supported in the new rich text editor: ReturnsVisible, SpacesVisible, TabBar, TabsVisible, and UndoDepth. If you set these properties on a RichTextEdit control, they are ignored by the new editor. The maximum undo depth in the new rich text editor is 50. This value cannot be changed at either design time or runtime.
The following table lists functions that have been modified in PowerBuilder 10.5:
Function |
Description |
---|---|
InsertDocument |
This function supports the following additional file types:
Also, you can replace, but not add to, existing headers and footers with headers and footers from a document that you insert using this function. To replace an existing document, including its headers and footers, you must set the clearflag argument to “true”. |
PasteRTF |
Due to a minor quirk in the new rich text editor, the PasteRTF function always ignores the last paragraph tag at the end of an RTF string that you paste in a control when there is more than one paragraph tag. |
SaveDocument |
This function supports the following additional file types:
|
ScrollNextPage and ScrollPriorPage |
These functions work in the RichTextEdit control edit mode only when the HeaderFooter property of a rich text control is selected. They work in print preview mode regardless of the HeaderFooter property setting and they work for the RichText DataWindow control in edit mode whether or not the DataWindow has header or footer bands. |
SelectedLength, SelectText, and SelectTextAll |
These functions count carriage returns and line feeds as single characters rather than as separate characters. Other functions, such as LineLength, SelectTextLine, SelectTextWord, and TextLine do not include carriage returns or line feeds in character counts. |
SelectedLine |
Obtains the number of the line that contains the insertion point in an editable control. The insertion point now moves to the next line if the current line contains a carriage return. |
SetTextStyle |
A new overloaded syntax removes the boolean arguments for superscript and subscript formatting. Users can set superscript or subscript styles from the properties dialog box that they access by double-clicking blank areas of the toolbar. The overloaded syntax is: integer rtename.SetTextStyle ( boolean bold, boolean underline, boolean italic, boolean strikeout ) |
ShowHeadFoot |
A new overloaded syntax adds a boolean argument for specifying whether the insertion point (caret) for editing the header/footer panel is in the header or the footer section. Values are: The second argument is ignored if the first argument is false. The second argument defaults to “true” if a value is not provided. The overloaded syntax for this function is: integer rtename.ShowHeadFoot ( boolean editheadfoot, boolean headerfooter ) |
The InputFieldSelected and the PictureSelected events are no longer triggered when the user presses the Enter key. The PrintHeader and PrintFooter events are obsolete. They are no longer triggered under any circumstance.
The Properties view for a RichTextEdit control now includes a Font tab page where you can set default font characteristics for the control. When the control first displays at runtime, and you include the toolbar with a RichTextEdit control, the toolbar indicates the default font characteristics that you selected on the Font tab page at design time. Although the application user can change fonts at runtime, or you can use PowerScript to change the font style, you can set the default font at design time only.
When you migrate applications created in older versions of PowerBuilder, the InputFieldsVisible property in RichTextEdit controls and in RichText DataWindow objects is automatically set to “false” in the migrated applications. You must set this property to “true” to see data in the input fields. You must set this property and the InputFieldNamesVisible property to “true” to see text labels for the input fields in a rich text control.