Open mennodeij opened 8 years ago
Thanks for reporting! This should be a relatively easy addition, though I'm not sure if there's correlating functionality in other toolkits (or even if they are needed). On those toolkits, these methods could just do nothing if not needed.
It may be that other toolkits are not so slow; I'll see if I can test this on Gtk soon.
Today, I tried to do some colours on a RichTextBox with about 200 lines of XML text, in total about 8000 characters or so, with the objective of syntax colouring for XML. I tried various methods, based on regex or simple string scanning, but applying this to a few hundred XML tags took about 20 seconds. I was hoping to do this real-time while the user is typing :smile:
Apparently, it is a known problem with RichTextBox, which might be solved by using
BeginChange()
andEndChange()
or usingControl.DeclareChangeBlock()
.http://stackoverflow.com/questions/17852635/slow-formatting-of-richtextbox