Skip to content

pbBold - DfBaseRichEdit

Toggles selected text between bold and normal text

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

Syntax

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

Description

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

This property has no effect if control is not paged.

Sample

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

set pbBold of oRichEdit1 to True

Sample

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

set pbBold of oRichEdit1 to False

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