Scrolling within a Text Box

G

Geoff Olding

In VB.Net, if you click on an editable text box which is
too small to fully display its contents, the content are
right aligned (i.e. scrolled).
This is OK, however when you move away from the text box,
the display is not changed, i.e. the contents are not then
left aligned again so that the user sees the beginning of
the contents, not the end.
How do I change this programatically?
 
E

Erik Frey

I'm not sure I understand your question completely, but try this:

TextBox1.SelectionStart = 0
TextBox1.SelectionLength = 0

Erik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top