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

New Post: How do you delete text in a ScintillaNET?

$
0
0
Ok I figured this one out too. Combination of weird behavior and a bug.

scintilla.GetRange(0, nTrimLength).Text = ""; does delete the text, but NOT if the ReadOnly attribute is true.

BUT, when you call ReplaceTarget, even though no text is replaced, it still returns the "number of characters replaced" as the number of characters you wanted to replace. So it makes you think it worked, but it didn't. This is just odd and I would consider this to be a bug.

So to handle it I just wrote up a DeleteRange method that removes the readonly attribute and re-adds it if necessary. This really shouldn't be necessary though imo.

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>