views:

22

answers:

1

I'm starting development using scintilla in VB.NET and I'm creating a serial terminal program. The Scintilla control shows what data has been received in my computer serial port.

I need to programmatically add text to control.

When I use:

Scintilla1.Text = Scintilla1.text & "New Data received" & chr(13)

the text is added to Scintilla but it clears all formatting that exists in text that was in control before adding.

So, my questions:

1 - The way I'm adding text to Scintilla is correct? I did not found a method "AddText()".

2 - Why I'm loosing text formatting when I add text?

Thanks for all help!

+1  A: 

You lose formatting as your assigning to Scintilla1.Text which will replace *everything (including any styling you've applied) in the window.

As you say AddText or AppendText are the ways to preserve whats already there.

Alex K.