Hello guyz can i ask for the right syntax for Focus
this is what i want to be happen.
if i hit the Tab(keyboard) the focus from userNameTextBox.Text
will go to passwordTextBox.Text
and will highlight all the characters(if there is) so that i can change it all without using Backspace(Keyboard) i already know the TabIndex property. what i'm trying to ask is what is the syntax for Highlight all characters :) your help is very appreciated :) thankyou!!
Asked
Active
Viewed 124 times
1

Yukimoto Otomikuy
- 101
- 2
- 3
- 8
-
must admit, nice design – Freelancer Jun 08 '13 at 08:19
-
i think we have same question btw thank you :) and Freelancer thank you too :) – Yukimoto Otomikuy Jun 08 '13 at 08:33
1 Answers
0
Subscribe for the Focused-Event of the Textbox. In the eventhandler you can select all text of the TextBox by doint:
private void OnFocused(object sender, EventArgs e)
{
(sender as TextBox).SelectAll();
}

Tomtom
- 9,087
- 7
- 52
- 95