New RichTextEdit control

In PowerBuilder 2017, a new RichTextEdit control is added for free use by the PowerBuilder developer and the InfoMaker developer.

This new control is applicable to the RichTextEdit control, RichText DataWindow Object, and the RichText edit style column.

For the PowerBuilder developer, they have the option to use the new control for free, or to continue using the old control (the old control will need to be purchased separately). For the InfoMaker developer, they can only use the new control; they cannot use the old control any more.

The new control has the same functions/events/properties as the old control, except for the following differences and issues (due to the different ways they are designed):

Affected area

Type

Description

Double-byte languages

Unsupported

Double-byte languages such as Korean, Japanese are not supported well in the new control.

InputFieldBackColor property

Limitation

For the new control, this property will not take effect until you save the data into a PDF file or print the data; which means, when you preview the UI in the design view or when you run the UI, you will always see the background color is gray, only when you save the data to a PDF file or print the data, you will see the background color is changed to what you set.

Wordwrap property

Limitation

For the new control, this property is always true (it cannot be set to false).

BackColor property

Difference

For the new control, if you set a negative value for the BackColor property, the returned value will be 0 and the color will be black.

For the old control, if you set a negative value for the BackColor property, the returned value will be 16777215 and the color will be white.

BottomMargin/RightMargin/LeftMargin/TopMargin properties

Difference

For the new control, if you set a negative value, the returned value will be 0.

For the old control, if you set a negative value, the returned value will be the negative value.

Find function

Enhancement

For the new control, the Find function can not only find the text string, but also can find the carriage return characters and some special characters.

GetTextColor/GetTextStyle functions and font settings

Difference

For the new control, this function will return the settings (text color, font name, text style etc.) of the first character of the selected text if the selected text contains more than one type of settings.

For the old control, this property will return empty if the selected text contains more than one type of settings.

GetAlignment/GetSpacing/GetParagraphSetting functions

Difference

For the new control, this function will return the alignment (or spacing or paragraph settings) of the paragraph where the insertion point is located if more than one paragraph are selected.

For the old control, this property will return null if more than one paragraph with different alignments (or spacing or paragraph settings) are selected.

GetParagraphSetting function

Difference

The returned value is different between the new control and the old control due to the different units used.

Visio drawings

New feature

Visio drawings can be pasted or inserted into the new control.

Preview

New feature

All pages can be previewed (by scrolling) in the new control; while only the first page can be previewed in the old control.

SelectedPage function

Limitation

For the new control, the SelectedPage function returns the number of the page which is being viewed (rather than where the insertion point is placed).

ShowHeadFoot function

Difference

When the document is in preview mode, the old control returns 1; while the new control returns 1 and closes the preview mode, and when the parameter is true, the insertion point is placed to the header band; when the parameter is false, the insertion point is placed to the detail band.

ReplaceText function

Limitation

In the new control, the text after replaced will take over the settings (such as font name, font size etc.) carried over by the given string.

SaveDocument function

Limitation

In the new control, when saving to HTML, the image will lose some quality and will be saved as individual files separately from the document and the reference to the image file uses the absolute path,.

CopyRTF function

Difference

The new control will return a longer string which contains more types of information.

Insertion point

Difference

When the user switches the editor band (e.g. from the header/footer band to the detail band), the insertion point is placed to the last column and last row in the new control, while the insertion point's last position will be remembered and restored in the old control, if it is the firs time, the insertion point is placed to the first column and first row.

Input field

Difference

The new control limits the length of the input field data to no more than 2000 characters while the old control has no such limitation.

Font

Difference

In the new control, if the user uses a non-English input method to input the English characters, the inserted characters appear like using a different font than the other characters, although they actually use the same font.

Image

Difference

In the new control, when the user tries to manually select an image (only image, no text), the user can only select it by dragging from end to beginning, but cannot select by dragging from beginning to end.

Bullet list alignment

Issue

In the new control, the bullet symbol is cut off in a rich-text edit style column under the preview mode or print mode because the bullet list is not perfectly aligned with the body text.