By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,649 Members | 696 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,649 IT Pros & Developers. It's quick & easy.

Textbox property to select Appended text

P: 3
I use Autocomplete SuggestAppend in relation to a textbox.

Assuming my textbox shows numbers and the dropdown list contains for example
12312
13411
14511
15611

If I type "1" I will see in the textbox "12312" with "2312" appended and the dropdown list showing the options. I can use textbox.Text to get the "1" which I typed.

How can I get the entire textbox value ie "12312" (the "1" and the appended "2312")?

Thanks
Apr 16 '14 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 1,510
not sure what you are attempting to do but could you test the keypress and depending on the key write the required string to the TextBox, e.g.
Expand|Select|Wrap|Line Numbers
  1.     Private Sub TextBox1_KeyPress(sender As System.Object, e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
  2.         If e.KeyChar = "1"c Then
  3.             TextBox1.AppendText("12345")
  4.         End If
  5.         e.Handled = True
  6.     End Sub
  7.  
when 1 is kit 12345 is writen to the TextBox
Jul 6 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.