Appending Input to TextBox

  • Thread starter Thread starter Richard Grene
  • Start date Start date
R

Richard Grene

I am setting a textbox to a value (ex: ABC). I then setfocus to the textbox
and I want my input to start after the ABC. So if I then enter DEF, my
textbox will show ABCDEF. I need this to occur one character at a time as it
is being entered, not at validating time because I have to examine the
contents of the textbox at each KeyPress Event.

Any help will be appreciated.

Thanks,
Richard
 
* "Richard Grene said:
I am setting a textbox to a value (ex: ABC). I then setfocus to the textbox
and I want my input to start after the ABC. So if I then enter DEF, my
textbox will show ABCDEF. I need this to occur one character at a time as it
is being entered, not at validating time because I have to examine the
contents of the textbox at each KeyPress Event.

Why? What if the user pastes some text from the clipboard to edit it in
the textbox?
 
Hi Richard,

Probably you need only the last line, however this is nice to see.

I hope it helps?

Cor
\\\
TextBox1.Text = "ABC"
For i As Integer = 1 To 3
Me.TextBox1.Text += ChrW(67 + i)
Me.Show()
Application.DoEvents()
Threading.Thread.Sleep(1000)
Next
TextBox1.Select(TextBox1.Text.Length, 0)
///
 

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

Back
Top