Skip to content

pbSuperScript - DfBaseRichEdit

Toggles selected text between superscripted and normal text

Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None

Syntax

Property Boolean pbSuperScript
Access Type Syntax
Read Access: Get pbSuperScript to BooleanVariable
Write Access: Set pbSuperScript to BooleanVariable/Value

Description

Toggles the selected text in the control between superscripted and normal text. If no text is selected and this property is set to true, any text typed from this point forward will be superscripted.

This property has no effect if control is not paged.

Sample

This sample changes the font of the selected text in control oRichEdit1 to superscript.

set pbSuperScript of oRichEdit1 to True

Sample

This sample changes the font of the selected text in control oRichEdit1 to normal (non-superscript).

set pbSuperScript of oRichEdit1 to False

If you get this property and it is not consistent throughout the selection, it will return the pbSuperScript value for the first character of the selection, and LastErrorCode will equal ERR_RE_ATTR_INCONSISTENT_THROUGH_SELECTION.

Sample

This sample gets the value of pbSuperScript, then checks if pbSuperScript was not consistent throughout the selected text by checking if LastErrorCode is equal to ERR_RE_ATTR_INCONSISTENT_THROUGH_SELECTION. If so, you can do any special handling you wish in the begin..end code block.

Integer iLastErrorCode
Boolean bIsSuperScript
get pbSuperScript to bIsSuperScript
get LastErrorCode to iLastErrorCode
if (iLastErrorCode = ERR_RE_ATTR_INCONSISTENT_THROUGH_SELECTION) begin
    // do something
end