如何在NumericUpDown C#中选择所有文本-Windows Mobile应用程序 [英] How to select all text in NumericUpDown c# - windows mobile application

查看:79
本文介绍了如何在NumericUpDown C#中选择所有文本-Windows Mobile应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows移动应用程序上工作,并添加了numericupdown控件.

当获得焦点时,它将光标置于控件的开头.我需要重点放在全文上,以新输入的值替换该值.

我在某些论坛中发现可以使用

I''m working on a windows mobile application and added a numericupdown control.

When get focused it places the cursor at the beginning of the control. What I need is to focus the full text to replace the value with new entered value.

I found in some forums to use

NumericUpDown1.Select(0, NumericUpDown1.Text.Length);



但是应用程序无法编译并发送错误:
方法选择"的无重载采用"2"个参数"

该怎么办?



But application does not compile and send the error:
"No overload for method ''Select'' takes ''2'' arguments"

What to do?

推荐答案

好吧,我找到了一种针对相同情况的解决方案:

该控件没有适用于Windows Mobile的功能,但是您可以使用此出色的代码

http://blog.markarteaga.com/SelectingControlText.aspx [
Well, I found a solution for those with the same situation:

The control does not have that function available for windows mobile, but you can use this great code

http://blog.markarteaga.com/SelectingControlText.aspx[^]


这篇关于如何在NumericUpDown C#中选择所有文本-Windows Mobile应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆