Quantcast
Channel: ScintillaNET Forum Rss Feed
Viewing all articles
Browse latest Browse all 296

New Post: BUG: scintilla.CurrentPos and scintilla.Caret.Position bugged

$
0
0
Works for me...
// Update the text box when the caret moves
scintilla.NativeInterface.UpdateUI += (s, e) =>
{
    int byteOffset = scintilla.CurrentPos;

    // TODO Cache this and get creative or this will slow down your application
    Range range = scintilla.GetRange(0, byteOffset);
    int charOffset = range.Text.Length;

    textBox.Text = "Byte: " + byteOffset + "; Character: " + charOffset;
};
Jacob

Viewing all articles
Browse latest Browse all 296

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>