Thursday, April 06, 2006

TextBox.AppendText

Langleyben Leon - WinForm TextBox.AppendText

"Apparently this point is commonly overlooked:

Avoid using TextBox.Text += ... construct to build long content.

Use TextBox.AppendText instead. AppendText internally set selection after last character in Textbox and then replace selection with supplied text using SendMessage API. This method is more effective by order of multitude. Note that after AppendText invocation textbox scrolled down to the last line. This is making difference in textboxes with long content (and scrollbar)." (Leached in full)
sigh... So much to learn...

The TextBox.AppendText sounds like a very cool method, a perfect way to streamline one of my common textbox usage senarios ...

I think I need to get a USB jack installed in my head so I can upload all this crud directly into my brain. A mini-USB jack isn’t too big... ;)

Technorati Tags: , ,

No comments: