Flickering text

Is there any way to stop flickering inside a textarea when selecting, then changing the selected text’s characteristics (I’m changing text color), then de-selecting it programmatically? My routine works fine, just flickers slightly sometimes. Here’s the code:

DspTextArea.TextColor = bColor DspTextArea.text = gScriptDisplayed DspTextArea.SelStart = P-1 DspTextArea.SelLength = len(Txt) DspTextArea.SelTextColor = tColor DspTextArea.SelLength = 0

I think you need to be using TextArea.StyledText to set the text properties like that.
Sel* values are for when you’re changing the properties on the selected text from a formatting toolbar.

Thanks. Haven’t done that before. I’ll see how that goes.

Try this on OS X https://blog.xojo.com/2015/12/28/speeding-up-textarea-modifications-in-os-x/

The other way I can think of would be to hide the textArea “textArea.visible = false”, perform changes and show the textArea “textArea.visible = true”. We used to have to do this when manipulating the ListBox.

It would greatly help if you mentioned the platform, since you posted in General. Windows is usually more prone to flicker.