Skip to content

pbSubScript - DfBaseRichEdit

Toggles selected text between subcripted and normal text

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

Syntax

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

Description

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

This property has no effect if control is not paged.

Sample

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

set pbSubScript of oRichEdit1 to True

Sample

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

set pbSubScript of oRichEdit1 to False

If you get this property and it is not consistent throughout the selection, it will return the pbSubScript 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 pbSubScript, then checks if pbSubScript 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 bIsSubScript
get pbSubScript to bIsSubScript
get LastErrorCode to iLastErrorCode
if (iLastErrorCode = ERR_RE_ATTR_INCONSISTENT_THROUGH_SELECTION) begin
    // do something
end