TPDFlibSearchPanel
查看器
描述
TPDFlibSearchPanel(单元 Lib\PDFlibViewer.pas,v3.127.0 新增)是 TPDFlibViewer 的搜索面板。RunSearch 会把整份文档的命中逐行填入列表,行内容形如 p<page>: <matching text>;单击命中项会让附加的查看器跳到该命中所在的页
语法
Delphi
Function RunSearch(Const Query: WideString;
CaseSensitive: Boolean= False): Integer;
Property LastQuery: WideString;
Property HighlightInView: Boolean;绑定与行接口(AttachViewer、ItemCount、ItemText、ItemData、Viewer)继承自 TPDFlibViewerPanel
参数
RunSearch | 搜索附加的文档并列出命中;返回找到的命中总数,没有固定的结果上限。空查询会清空列表 |
|---|---|
LastQuery | 最近一次 RunSearch 的查询文本 |
HighlightInView | 为 True 时(v3.216.0 起的默认值),每条命中还会像 HighlightSearchHits 那样在附加的查看器中绘出一条半透明条 |
备注
跳转后各行仍保留在列表中,因此面板还能兼作结果浏览器;面板的 HighlightInView 关闭时,已绘出的条改由查看器自身的 HighlightSearchHits / ClearSearchHighlights 独立管理
另请参阅
TPDFlibViewerPanel, TPDFlibViewer, HighlightSearchHits, TPDFlibOutlineViewer, TPDFlibThumbnailBar