如何禁用 labelname.tabindex? [英] How to disable labelname.tabindex?

查看:31
本文介绍了如何禁用 labelname.tabindex?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 winform 应用程序,我想禁用标签的 tabindex.当我按下 Tab 键时,我不希望焦点在标签上.怎么做??

I am using winform application and I want to disable the label's tabindex. I don't want the focus to be on label when I hit my tab key. How to do that??

推荐答案

这相当神奇.让标签停止在标签上是非常困难的,它不想要焦点.它的构造函数将 TabStop 属性设置为 false.更难的是看到标签有焦点,它没有任何方式表明它.这就引出了一个问题,你怎么知道标签获得了焦点.

This is fairly miraculous. Getting the tabbing to stop at a label is very hard, it doesn't want the focus. Its constructor sets the TabStop property to false. What is even harder is seeing that the label has the focus, it doesn't have any way to indicate it. Which begs the question how you know that the label got the focus.

再三检查这个,你可能误解了真正发生的事情.就像在其余控件上使用错误的 TabIndex 值一样.View + Tab Order 是一个非常方便的设计器命令,它使 Tab 键顺序易于查看和修改.

Triple check this, you might be mis-interpreting what is really going on. Like having the wrong TabIndex value on the rest of the controls. View + Tab Order is a very handy designer command that makes the tabbing order easy to see and modify.

这篇关于如何禁用 labelname.tabindex?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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