Page display properties for RichTextEdit control

Page display properties for RichTextEdit controls allow you to manage the size and orientation of documents inside the controls. These display properties are separate from the page properties that can be set at runtime for printing the contents of RichTextEdit controls. They are also separate from the height and width properties of the controls themselves.

The following table lists and describes the new display properties. These properties are implemented for standard PowerBuilder targets and for Windows Forms targets. They are not implemented for Web Forms targets:

Property

Description

PaperHeight

Value for the height of the page in current units

PaperWidth

Value for the width of the page in current units

PaperOrientation

Switches the values for PaperHeight and PaperWidth. Values are:

  • PaperPortrait! If the current PaperWidth is larger than the current PaperHeight, switches these values so the PaperHeight is larger. If the current PaperWidth is smaller than the current PaperHeight, does not change these values. Value of 0 returned for this setting.

  • PaperLandscape! If the current PaperHeight is larger than the current PaperWidth, switches these values so the PaperWidth is larger. If the current PaperHeight is smaller than the current PaperWidth, does not change these values. Value of 1 returned for this setting. The PaperOrientation value is also set to this value when the PaperHeight and PaperWidth are the same size.

NoteChanging current units By default, the current units are set to 1/1000 of an inch, so to display a paper height of 11 inches, you must set the PaperHeight value to 11000. If you enable the PopMenu property of the RichTextEdit control, you allow the application user to bring up the Rich Text Object dialog box and change the current units to 1/1000 of a centimeter. If the user switches the unit value to centimeters, the values for PaperHeight and PaperWidth are multiplied by 2.54.

By default, the values you set for PaperHeight and PaperWidth are used for printing as well as for screen display. When you set either or both of these screen display values, the default value for the Size drop-down list on the Print Specifications page of the Rich Text Object dialog box changes to Customized.

Similarly, the default value for page orientation on the Print Specifications page changes when you assign a value to the PaperOrientation property. Application users can modify the print specifications from the Rich Text Object dialog box at runtime, but only if you set the PopMenu property of the rich text object to true.