使用 Delphi XE2 打开 CHM 帮助文件时无法使用 Ctrl-F
使用 Delphi XE2(更新 2)创建一个在窗体上带有按钮的 Win32 VCL 应用程序。确保 HTMLHelpViewer 在使用列表中。在FormCreate 中将应用程序帮助文件设置为有效的CHM 帮助文件,例如
Application.HelpFile:='C:\path to my help file\help file.chm';
在按钮OnClick 事件中让它显示帮助文件的目录:
Application.HelpShowTableOfContents;
运行应用程序,单击按钮,将出现帮助文件。现在,单击帮助窗口中右侧的内容框架(显示当前主题的帮助文本,而不是左侧的帮助主题列表),然后按 Ctrl- F 查找一些文本。什么也没发生。
如果您从资源管理器打开帮助文件,则 Ctrl-F 按预期工作。
如果我在 Delphi 2007 中使用相同的代码和帮助文件,则 Ctrl-F 将按预期工作。
XE2 中的错误,还是我忘记设置的东西?我在 Win7 x64 中测试了这一点。
With Delphi XE2 (Update 2) create a Win32 VCL application with a button on a form. Make sure HTMLHelpViewer is in the uses list. In FormCreate set the application help file to a valid CHM help file, e.g.
Application.HelpFile:='C:\path to my help file\help file.chm';
In the buttons OnClick event get it to show the table of contents for the help file:
Application.HelpShowTableOfContents;
Run the application, click the button, the help file appears. Now click on the contents frame on the right (the one that shows the help text for the current topic, not the list of help topics on the left) in the help window and press Ctrl-F to find some text. Nothing happens.
If you open the help file from Explorer then Ctrl-F works as expected.
If I use the same code and help file with Delphi 2007 then Ctrl-F works as expected.
Bug in XE2, or something I've forgotten to set? I tested this in Win7 x64.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论