I'll never remember this one, so here's the scenario.
Flaky code reading single bytes from a network stream, want a multiline textbox to show the output live. Problem is the cursor is at the top and text appends to the bottom. If I force the cursor to the bottom with textbox.scrolltocaret it's well flashy. Simple answer, don't add to the textbox.text, append to the box itself thus:
BAD
textbox.text=textbox.text & "stuff"
textbox.refresh
textbox.scrolltocaret
BETTER
textbox.SelectionStart = outputbox.TextLength
textbox.SelectedText = "stuff"
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2009
(14)
-
▼
May
(8)
- Using registry from VB.net/express
- Textbox handling control-C copy/paste
- Multiline Textbox update with autoscroll and less ...
- VB (.net/2008 express) Telnet to SUN Solaris - don...
- VB (2008/.net but anything really)- Telnet
- Sourceforge - how to upload web pages to a project...
- Todays challenge - learning C or C++ or something
- Welcome to my head - online!This is basically what...
-
▼
May
(8)
No comments:
Post a Comment