text cursor position

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ilann

    text cursor position

    Hi,

    I need to get the text cursor position in a richedit Control, ie I want my
    ContextMenu to appear exactly where the user is typing text,


    Thanks


  • Stoitcho Goutsev \(100\) [C# MVP]

    #2
    Re: text cursor position

    Hi Ilann,

    Look at the RichTextBox.Get PositionFromCha rIndex method. The character
    index (where the caret is) you can get from RichTextBox.Sel ectionStart
    property

    --
    HTH
    Stoitcho Goutsev (100) [C# MVP]


    "Ilann" <ilann@free.f r> wrote in message
    news:OrCRBJQvEH A.200@TK2MSFTNG P11.phx.gbl...[color=blue]
    > Hi,
    >
    > I need to get the text cursor position in a richedit Control, ie I want my
    > ContextMenu to appear exactly where the user is typing text,
    >
    >
    > Thanks
    >
    >[/color]


    Comment

    Working...