views:

764

answers:

2

When the user tabs into my NumericUpDown I would like all text to be selected. Is this possible?

+7  A: 
private void NumericUpDown1_Enter(object sender, EventArgs e)
{
    NumericUpDown1.Select(0, NumericUpDown1.Text.Length);
}

(Note that the Text property is hidden in Intellisense, but it's there)

Jon B
@Jon: Darn intellisense :-/ Good call with the Text property.
Daniel LeCheminant
@Daniel: +1, Darn indeed! @Jon B: +1, Nice - helped me out :)
Pwninstein
A: 

I remember having to address this before and did something like this forum poster suggested.

Jess