Delphi - 当焦点丢失时在 RichEdit 中保留突出显示的选择
我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TRichEdit 有一个属性
HideSelection
,默认情况下为True
。如果设置为False
,那么即使 TRichEdit 没有焦点,所选内容仍然可见。顺便说一句:属性
HideSelection
也存在于其他控件上。当您在列表视图或树视图中显示所选项目的详细信息时,它在 TListView 或 TTreeView 上也非常有用。TRichEdit has a property
HideSelection
which isTrue
by default. If set toFalse
then the selection will still be visible even when the TRichEdit does not have focus.BTW: the propery
HideSelection
exists 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.