从子窗口进行拼写检查时突出显示父窗口文本

发布于 2024-08-26 11:37:06 字数 192 浏览 0 评论 0原文

我正在为我正在做的讲座开发一个简单的拼写检查应用程序。我已经使用子表单和 NHunspell 使基本的拼写检查代码工作得很好 - 顺便说一下,很棒的库。

但是,我希望父文本框显示突出显示的文本以供参考,并且当我相应地设置 SelectedText 属性时,文本不会在父文本框中突出显示。取消子窗口,父文本突出显示。

有人知道我该怎么做吗?

I'm working on a simple spell checking app for a lecture that I'm giving. I've got the basic spell checking code working just fine using a child form and NHunspell - great lib, by the way.

However, I'd like for the parent textbox to show the highlighted text for reference, and while I'm setting the SelectedText properties accordingly, the text is not highlighted in the parent. Canceling the child window and the parent text is highlighted.

Anybody know how I can do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稚气少女 2024-09-02 11:37:06

尝试在 TextBox 上将 HideSelection 设置为 false。这将使 TextBox 即使没有焦点也显示所选内容。

Try setting HideSelection to false on the TextBox. That will make the TextBox show the selection even when it does not have focus.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文