用户控件上的Tab键顺序 [英] tab order on a user control

查看:167
本文介绍了用户控件上的Tab键顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候


我用google搜索无效,也许这里有人可以提供帮助。我有一个

用户控件,有几个单选按钮和文本框。我在Windows窗体上放置了5

这些用户控件。我在用户控件的

上设置了Tab键顺序,然后在windows窗体上设置了Tab键顺序。对于

某些原因我只选择从用户控件到用户控件。在进入

下一个用户控件之前,是否有任何

方式通过我的用户控件标签。


干杯并且谢谢


Bob

Greetings

I have googled this to no avail, maybe someone here can help. I have a
user control that has several radio buttons and text boxes. I place 5
of these user controls on a windows form. I have set the tab order on
the user control and then I set the tab order on the windows form. For
some reason I only tab from user control to user control. Is there any
way to tab all the way through my user control before proceeding to the
next user control.

Cheers and thanks

Bob

推荐答案

Bob,


我害怕我真的不明白你在说什么。


按Tab键可以将焦点移动到用户控件上,具体取决于

您的标签订单号。


您是否正在谈论通过对话框中的不同标签页进行标签?如果

所以,重点是标签页本身,在这种情况下你可以通过该页面上的控件或标签控件导航

,其中如果你是
可以浏览当前存在的标签页。如果您希望从一个标签页上的最后一个控件,到

下一个标签页上的第一个控件标签

,那么您需要实例化并编写焦点离开事件

为该控件...当事件触发时,你可以检查它是否是

因为某人选中了该控件,然后激活下一个选项卡

页面,并将焦点设置为您想要的控件。


祝你好运,

Dan。

" Bob Cummings" < RA **** @ dwave.net>在留言中写道

news:uc ************** @ tk2msftngp13.phx.gbl ...
Bob,

I''m afraid I don''t really understand what you''re saying.

Pressing the Tab key moves the focus through your user controls depending on
your tab order numbers.

Are you talking about tabbing through different tab pages on a dialog? If
so, the focus is either in a tab page itself, in which case you can navigate
through the controls on that page, or in a tab control, in which case you
can navigate through the tab pages that currently exist. If you wish to tab
through from the last control on one tab page, to the first control on the
next tab page, then you need to instatiate and write the Focus Leave event
for that control... when the event fires, you can check whether it was
because someone tabbed off that control, and then activate the next tab
page, and set the focus to the control you wish.

Good luck,
Dan.

"Bob Cummings" <ra****@dwave.net> wrote in message
news:uc**************@tk2msftngp13.phx.gbl...
问候

我用google搜索无济于事,也许有人可以提供帮助。我有一个
用户控件,有几个单选按钮和文本框。我将5个这些用户控件放在Windows窗体上。我在用户控件上设置了Tab键顺序,然后在windows窗体上设置了Tab键顺序。出于某些原因,我只从用户控件到用户控件进行选项卡。在进入
下一个用户控件之前,是否有任何方法可以通过我的用户控件进行选项。

干杯和谢谢

鲍勃
Greetings

I have googled this to no avail, maybe someone here can help. I have a
user control that has several radio buttons and text boxes. I place 5
of these user controls on a windows form. I have set the tab order on
the user control and then I set the tab order on the windows form. For
some reason I only tab from user control to user control. Is there any
way to tab all the way through my user control before proceeding to the
next user control.

Cheers and thanks

Bob



Bob,

是否选择了一个单选按钮?


使用VB Windows XP专业版下的.NET 2003:如果我创建一个带有2

的UserControl TextBox控件& 3单选按钮控制并在表单上放置多个这些

UserControls,如果没有选中单选按钮(在每个
UserControl上)单选按钮不属于选项卡顺序,但是如果我选择(选中)一个单选按钮,那么它就包含在标签顺序中。


注意同样的事情发生在2文本框控件& 3单选按钮

直接控制表格。


这确实感觉像是一个错误,我会看到我能找到的东西。


希望这有帮助

Jay


" Bob Cummings" < RA **** @ dwave.net>在留言中写道

news:uc ************** @ tk2msftngp13.phx.gbl ...
Bob,
Is one of your radio buttons selected?

Using VB.NET 2003 under Windows XP Pro: If I create a UserControl with 2
TextBox controls & 3 Radio Button controls and place multiple of these
UserControls on a form, if there is no radio button checked (on each
UserControl) the radio buttons are not part of the tab order, however if I
select (check) a radio button, then it is included in the tab order.

Note the same thing happens with 2 textbox controls & 3 radio button
controls directly on the form.

This does feel like a bug, I will see what I can find out.

Hope this helps
Jay

"Bob Cummings" <ra****@dwave.net> wrote in message
news:uc**************@tk2msftngp13.phx.gbl...
问候

我用google搜索无济于事,也许有人可以提供帮助。我有一个
用户控件,有几个单选按钮和文本框。我将5个这些用户控件放在Windows窗体上。我在用户控件上设置了Tab键顺序,然后在windows窗体上设置了Tab键顺序。出于某些原因,我只从用户控件到用户控件进行选项卡。在进入
下一个用户控件之前,是否有任何方法可以通过我的用户控件进行选项。

干杯和谢谢

鲍勃
Greetings

I have googled this to no avail, maybe someone here can help. I have a
user control that has several radio buttons and text boxes. I place 5
of these user controls on a windows form. I have set the tab order on
the user control and then I set the tab order on the windows form. For
some reason I only tab from user control to user control. Is there any
way to tab all the way through my user control before proceeding to the
next user control.

Cheers and thanks

Bob



Jay


你点头了。我有点困惑,我不认为测试

。我想强迫用户在

单选按钮提供的两个选项之间进行选择。确实没有默认的单选按钮所以我

确保它们未被选中;强迫用户考虑他们需要做出哪些选择。


此时这对我来说只是一个快速而又脏的工具

我的工作测试文件,所以这不是什么大问题。但是,如果我决定将

与我的同事分享,我想把它作为用户证明。 as

可能。


感谢您的时间


Bob


Jay B. Harlow [MVP - Outlook]写道:
Jay

You hit it on the head. I am a bit baffled that I did not think to test
that. I wanted to force the user to choose between the two choices the
radio buttons offer. There really is not a default radio button so I
make sure they are unselected; forcing the user to think about which
choice they need to make.

At this point it is only a quick and dirty utility for me to make up
test files for my work, so it is not a big deal. However, if I decide
to share it with my co-workers, I want to make it as "user proof" as
possible.

Thanks for your time

Bob

Jay B. Harlow [MVP - Outlook] wrote:
Bob,
是否选择了一个单选按钮?

在Windows下使用VB.NET 2003 XP专业版:如果我使用2个TextBox控件创建一个UserControl& 3单选按钮控制并将多个这些
UserControl放在表单上,​​如果没有选中单选按钮(在每个
UserControl上)单选按钮不是Tab键顺序的一部分,但是如果我
选择(选中)一个单选按钮,然后它包含在标签顺序中。

注意同样的事情发生在2个文本框控件和& 3单选按钮
直接在表单上控制。

这感觉就像一个bug,我会看到我能找到的东西。

希望这有助于
鲍勃卡明斯 < RA **** @ dwave.net>在消息中写道
新闻:uc ************** @ tk2msftngp13.phx.gbl ...
Bob,
Is one of your radio buttons selected?

Using VB.NET 2003 under Windows XP Pro: If I create a UserControl with 2
TextBox controls & 3 Radio Button controls and place multiple of these
UserControls on a form, if there is no radio button checked (on each
UserControl) the radio buttons are not part of the tab order, however if I
select (check) a radio button, then it is included in the tab order.

Note the same thing happens with 2 textbox controls & 3 radio button
controls directly on the form.

This does feel like a bug, I will see what I can find out.

Hope this helps
Jay

"Bob Cummings" <ra****@dwave.net> wrote in message
news:uc**************@tk2msftngp13.phx.gbl...
问候

我用google搜索无济于事,也许有人可以提供帮助。我有一个
用户控件,有几个单选按钮和文本框。我将5个这些用户控件放在Windows窗体上。我在用户控件上设置了Tab键顺序,然后在windows窗体上设置了Tab键顺序。出于某些原因,我只从用户控件到用户控件进行选项卡。在进入
下一个用户控件之前,是否有任何方法可以通过我的用户控件进行选项。

干杯和谢谢

鲍勃
Greetings

I have googled this to no avail, maybe someone here can help. I have a
user control that has several radio buttons and text boxes. I place 5
of these user controls on a windows form. I have set the tab order on
the user control and then I set the tab order on the windows form. For
some reason I only tab from user control to user control. Is there any
way to tab all the way through my user control before proceeding to the
next user control.

Cheers and thanks

Bob







这篇关于用户控件上的Tab键顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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