设置在NumericUpDown控件中的光标位置 [英] Setting the cursor position in a NumericUpDown Control

查看:1241
本文介绍了设置在NumericUpDown控件中的光标位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个用户控制塔在NumericUpDown控件继承。 是否有可能设置控件中的光标位置? 我验证了文本的onkeyup,并格式化它时,它符合一定的标准。 要做到这一点我必须做me.text = Fomatted(Me.Text),它设置光标回位0,我想将其设置为文本区域的末尾。

I have created a user control tha inherits from the NumericUpDown Control. Is it possible to set the cursor position within the control? I am validating the text OnKeyUp, and formatting it when it meets certain criteria. To do this i have to do me.text = Fomatted(Me.Text), which sets the cursor back to the position 0, i want to set it to the end of the text area.

感谢

推荐答案

使用

yourNumericUpDown.Select(desiredPosition,0)

这篇关于设置在NumericUpDown控件中的光标位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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