pbLink - DfBaseRichEdit
Toggles selected text between hyperlinked and normal text
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Syntax
Property Boolean pbLink
| Access Type | Syntax |
|---|---|
| Read Access: | Get pbLink to BooleanVariable |
| Write Access: | Set pbLink to BooleanVariable/Value |
Description
Toggles selected text between hyperlinked and normal text. If no text is selected and this property is set to true, any text typed from this point forward will be hyperlinked.
This property has no effect if control is not paged.
When the created link is clicked, OnLinkClicked is fired.
Sample
This sample changes the selected text to a hyperlink.
set pbLink to True
Sample
This sample changes the selected text to normal (non-hyperlinked) text.
set pbLink to False
If you get this property and it is not consistent throughout the selection, it will return the pbLink 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 pbLink, then checks if pbLink 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 bIsLinked
get pbLink to bIsLinked
get LastErrorCode to iLastErrorCode
if (iLastErrorCode = ERR_RE_ATTR_INCONSISTENT_THROUGH_SELECTION) begin
// do something
end
| Col 1 | Col 2 |
|---|---|
| Note: | When automatic URL detection is enabled (pbAutoUrl = True), the control removes the pbLink effect from modified text that does not have a URL format recognized by the control. If your application uses the pbLink effect to mark other types of text, do not enable automatic URL detection. |