使用箭头键浏览文本框 [英] Navigate TextBox using Arrow Keys

查看:77
本文介绍了使用箭头键浏览文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

在Form1中,我具有Panel1,并且在该panel1中,我在按钮单击事件上添加了usercontrol [具有四个文本框的usercontrol].

我正在尝试使用箭头键将usercontrol中的文本框从一个文本框导航到另一个文本框,但未按要求获取结果,有人可以帮助我如何做到这一点.

解决方案

Conrol是一款预定义的软件,可让用户处理屏幕上的数据.

Windows窗体文本框的制作方式使您可以使用箭头键将"Caret"移动到有人称它为光标,但实际上是一个不同的光标.

在所有窗口形式中,控件之间(鼠标旁边)的移动均由Tab键完成,该控件由父控件的索引控制.

请注意,您要做的并不是不可能,但是这样做对您自己来说不是一个好例子.

对于最终用户标准行为也进行这种更改,只会导致最终用户不接受,并且您的程序包含错误的许多调用.

从历史上看,移动也是通过箭头键完成的,但那已经很久了.

请注意,文本框并非总是单行的,也可以很容易地将其设置为多行.


Hello,

In my Form1 I have Panel1 and In that panel1 I am adding usercontrol [usercontrol having four textboxes] on button click event.

I am trying to navigate textboxes in usercontrol from one textbox to another using arrow keys but not getting result as required can somebody help me how can I do this

解决方案

A Conrol is a piece of predefined software to let the user handle data on the Screen. 

The Windows Forms textbox is so made that with the arrow key you can move the "Caret" some call it the cursor but that is in fact a different one.

With all windows forms is the movement between the controls (beside with the mouse) controlled by the index of the parent control done by the tab key. 

Be aware it is not impossible to do what you ask, but doing so you do yourself not a good case. 

Changing this kind of also for an end user standard behavior will only result nonacceptance of that end user and many calls that your program contains bugs. 

Once in history, the movement was also done by the arrow keys, but that was far back.

Be aware that a textbox is not always single line it can also very easily be set to multi-line. 


这篇关于使用箭头键浏览文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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