Delphi - 当焦点丢失时在 RichEdit 中保留突出显示的选择

发布于 2024-09-16 20:31:59 字数 85 浏览 1 评论 0原文

我有一个 TRichEdit。 当我选择某些文本并单击另一个元素时,所选文本的选择消失。 当 TRichEdit 失去焦点时,是否有办法保留此选择? 谢谢!

I have an TRichEdit.
When I select some text and click on another element, the selection of the selected text disappears.
Is there a way to keep this selection, also when the TRichEdit has los it's focus?
Thanks!

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

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

发布评论

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

评论(1

倚栏听风 2024-09-23 20:31:59

TRichEdit 有一个属性 HideSelection,默认情况下为 True。如果设置为False,那么即使 TRichEdit 没有焦点,所选内容仍然可见。

顺便说一句:属性 HideSelection 也存在于其他控件上。当您在列表视图或树视图中显示所选项目的详细信息时,它在 TListView 或 TTreeView 上也非常有用。

TRichEdit has a property HideSelection which is True by default. If set to False then the selection will still be visible even when the TRichEdit does not have focus.

BTW: the propery HideSelectionexists on other controls as well. It is also very usefull on a TListView or a TTreeView when you are showing details of the selected item in the listview or treeview.

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