PDFiumPas 文件

HasSelection 函数

组件: TPdfView  ·  单元: PDFium
返回查看器中当前是否有任何文本被选中

Syntax

function HasSelection: Boolean;

Description

Returns True if the viewer's internal selection model contains any non-empty range, otherwise False. Cheap (no PDFium round-trip) so it's safe to call from OnSelectionChange handlers, from a popup's OnPopup to enable / disable a Copy item, or from a paint loop.

Remarks

Example

CopyMenuItem.Enabled := PdfView1.HasSelection;

See Also

SelectionCharCount, SelectedText, SelectAll, ClearSelection, OnSelectionChange