TabIndex 无法正常工作的可能原因是什么 [英] what could be the possible reasons for TabIndex not working properly

查看:37
本文介绍了TabIndex 无法正常工作的可能原因是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我从 0 开始并为表单上的控件定义了 tabindex,但在运行时它全都搞砸了.形式有点复杂.它有水平和垂直分离器和面板、分组框和一些较旧的 VB 6.0 activeX 控件,它们是其中的树控件.即使我以编程方式执行它并阅读 previewkeydown eventg 并说它是否是 TAB 然后 control2.Focus() 它仍然工作错误.太令人沮丧了.有什么想法吗?..表单上也有不需要制表符的标签,所以我为它们的索引定义了 0.

so I have started from 0 and defining tabindex for the controls on my form but at run time it is all messed up. the form is a little complex tho. it has horizontal and vertical splitters and panels, group boxes and some older VB 6.0 activeX controls which is a Tree control inside them. even if i do it programmatically and read previewkeydown eventg and say if it is TAB then control2.Focus() it is still working wrong. so frustrating. any thoughts? ..there are also labels on the form which do not need tab so I have defined 0 for their index.

推荐答案

你是如何设置的?如果您在 Visual Studio 中使用设计视图中的表单选择视图 -> 选项卡顺序,然后按您想要的顺序单击每个项目.

How are you setting it? If you are in visual studio with the form in design view select view -> tab order and then click on each item in the order you want them.

通常对我有用.

这篇关于TabIndex 无法正常工作的可能原因是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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