vb.net - Is there a way to keep a Textbox triggered on Enter from accepting only spacebars -
I am writing a program that selects random colors, and every aspect of it is working at this point.
How it works: You can either use the return key or the button to add textbox to the listbox.
How would I like to work it: current In this, it does not accept any entry, so if text box 1. Text = "" This list does not include it in the box, but if the user simply will type "space" "space" "space" it will accept empty text. I want to avoid that so that there is no empty entries in the listboxes.
The relevant code:
The private sub text box changes 1_Text (as the sender object, and as the system .forms.KeyEventArgs) handles text box 1. If the KUEP is tried E.kcode = Key, then click on Textbox 1 text. Text = "" then other list callers. Items.ed (Textbox 1 text) Text box 1. You can remove the spaces (using) by comparing it with text = "" end and end and end and spaces:
P>
if TextBox1.Text.Trim () =" "then
Comments
Post a Comment