简体   繁体   English

从鼠标光标位置检索单词

[英]Retrieving the word from the mouse cursor position

I am trying to retrieve the word from the RichTextEdit control where the mouse cursor currently focusing on 我正在尝试从RichTextEdit控件中检索该单词,当前鼠标光标集中在该控件上

Is there any specific event in RichTextEdit that I can use to retrieve the word? RichTextEdit中是否有任何可用于检索单词的特定事件?

Thanks 谢谢

regards, Balan 问候,巴兰

If you are not talking about Devexpress RichTextEdit , then i think you can use the carret position as it is shown here 如果您不是在谈论Devexpress RichTextEdit,那么我认为您可以使用此处显示的carret位置

Problem with finding the next word in RichTextBox 在RichTextBox中找到下一个单词的问题

and also use the MouseDown event to use it . 并且还使用MouseDown事件来使用它。

also this maybe helps too 这也许也有帮助

http://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox.onmouseleftbuttondown%28v=vs.95%29.aspx http://msdn.microsoft.com/zh-cn/library/system.windows.controls.richtextbox.onmouseleftbuttondown%28v=vs.95%29.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM