如何在选项卡中选择Winforms NumericUpDown中的所有文本? [英] How to select all text in Winforms NumericUpDown upon tab in?
本文介绍了如何在选项卡中选择Winforms NumericUpDown中的所有文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当用户切换到我的 NumericUpDown
时,我希望所有文本都被选中。
When the user tabs into my NumericUpDown
I would like all text to be selected. Is this possible?
推荐答案
private void NumericUpDown1_Enter(object sender, EventArgs e)
{
NumericUpDown1.Select(0, NumericUpDown1.Text.Length);
}
(请注意,文本属性隐藏在Intellisense中,但在该位置)
(Note that the Text property is hidden in Intellisense, but it's there)
这篇关于如何在选项卡中选择Winforms NumericUpDown中的所有文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文