本文介绍了DevExpress控件的MemoEdit中的GetPositionFromCharIndex()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
GetPositionFromCharIndex()是一种可用于在RichTextBox中查找光标的当前Location(X,Y)点的方法.但是我希望在DevExpress的MemoEdit中使用它.谁能帮助我找到如何在MemoEdit中获得光标位置,以便可以在该MemoEdit中将ListBox用作Intelisense.
在此先感谢.
Hello,
GetPositionFromCharIndex() is a method that we can use to find the current Location(X,Y) point of cursor in RichTextBox. But I want this to be used in MemoEdit of DevExpress. Can any one kindly help me to find how can i get the Cursor Position in MemoEdit so that i can use ListBox as Intelisense in that MemoEdit.
Thanks In Advance.
推荐答案
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetCaretPos(out Point lpPoint);
或直接使用SelectionStart
属性.
祝您好运!
Or simply use the SelectionStart
property.
Good luck!
这篇关于DevExpress控件的MemoEdit中的GetPositionFromCharIndex()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!