473,513 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TabIndex property not working for me

I have a form with a variety of controls (TextBox, CheckBox, and Button).
I have assigned TabIndex values starting from 1 at the top, working my way
down the form to 15 at the bottom. Each of these has TabStop set to true.
When I run the application and repeatedly press the tab key, the on-screen
focus order is very different than what I thought I specified. If it
matters, here is the general layout of my form. As you'll observer, most
of the controls are within separate Panels, except for the main ok and
cancel buttons which are outside the TabControl. What am I doing wrong?

Form
TabControl
TabPage
TableLayoutPanel
Panel
Label
TextBox
Panel
Label
TextBox
Panel
CheckBox
TextBox
Panel
Label
TextBox
Panel
Label
TextBox
okButton
cancelButton
Apr 10 '06 #1
5 10069
Hi Michael,
Thank you for posting. From your post, my understanding on this issue is:
When you run your application and press the Tab key repeatedly, you can not
get proper focus order on your form. If IĄŻm off base, feel free to let me
know.
Since some controls such as Label TextBox are put into a Panel in your
project, the PanelĄŻs TabIndex property should be set properly first. For
example, there are four Panels on your form and each Panel contains several
controls. To get proper focus order, the four PanelsĄŻ TabIndex properties
should be set to sequent numbers and the TabIndex properties of the
controls in one Panel should be set to sequent numbers too.
Please let me know if you have any other concerns, or need anything else.

Sincerely,
Linda Liu
Microsoft Online Community Support

================================================== ==
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
================================================== ==

Apr 11 '06 #2
Thank you for the response. Working from your input, I now understood how
TabIndex properties nest with the nesting of components. (This is not at
all clear in the documentation.) So top level components must be numbered
0, 1, 2, etc. Then within those components, one starts renumbering again
from 0. So one might end up with, for example:
0.0, 0.1, 0.2, 1, 2.0, 2.1, 3, 4.0, 4.1, 5.0, 5.1, 5.1.1, 5.1.2, 5.2,
5.3
When the user tabs through a form, these numbers are simply consumed from
lowest to highest. Thus, since 4.1 is smaller than 5.0, the control at 4.1
will be reached before the one at 5.0.

On Tue, 11 Apr 2006 01:33:33 -0700, Linda Liu [MSFT]
<v-****@online.microsoft.com> wrote:
Hi Michael,
Thank you for posting. From your post, my understanding on this issue
is:
When you run your application and press the Tab key repeatedly, you can
not
get proper focus order on your form. If IĄŻm off base, feel free to let
me
know.
Since some controls such as Label TextBox are put into a Panel in your
project, the PanelĄŻs TabIndex property should be set properly first. For
example, there are four Panels on your form and each Panel contains
several
controls. To get proper focus order, the four PanelsĄŻ TabIndex
properties
should be set to sequent numbers and the TabIndex properties of the
controls in one Panel should be set to sequent numbers too.
Please let me know if you have any other concerns, or need anything
else.

Sincerely,
Linda Liu
Microsoft Online Community Support

================================================== ==
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
================================================== ==


Apr 12 '06 #3
Hi Michael,
I am glad to heart that the problem has been fixed. If you have any other
questions or concerns, please do not hesitate to contact us. It is always
our pleasure to be of assistance.
Have a nice day!

Sincerely,
Linda Liu
Microsoft Online Community Support

================================================== ==
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
================================================== ==

Apr 13 '06 #4
The TabIndex property is of type int and not float/double. How would
one indexes of nested component to say 0.0., 0.1 etc.

Apr 24 '06 #5
<lo**************@gmail.com> wrote:
The TabIndex property is of type int and not float/double. How would
one indexes of nested component to say 0.0., 0.1 etc.


I think the point is that the top-level component has index 0, then the
components within it have 0 and 1 to get effective indexes of 0.0 and
0.1, etc.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Apr 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
20358
by: jerrygarciuh | last post by:
Hello, I have been playing with various Googled solutions for capturing the <Enter> key to suppress form submission. My first question is whether anyone has a script that works in all common...
4
4837
by: Robert W. | last post by:
I'm preparing a form with some controls laid out at design time and some controls added dynamically at run time. During the latter I programatically set the TabIndex of these new controls so that...
2
1449
by: Ravikanth[MVP] | last post by:
Hi You can remove a Web Server control from the tab order by setting the TabIndex property to a negative value. Try after setting tabIndex property to a negative value. HTH Ravikanth
2
15087
by: kai | last post by:
Hi, All I try to setup Tebindex in ASP.NET page like in Windows form, using Tabview, but cannot fnd it. In the properties windows in ASP.NET, change Tabindex does not change the tab order. How...
4
445
by: Wayne Wengert | last post by:
I cannot get the tab settings on an aspx page to work as desired. First of all, I don't see a way to indicate whether a control is a tab stop. There is a tabindex property for labels (why?). When I...
3
2292
by: Mike Eaton | last post by:
Hi there, I've got what I hope is a simple problem to solve... Here's the back story: I have a windows form. On the form is a panel containing three textboxes. Also on the form is a text box...
3
4950
by: Alex Maghen | last post by:
Hi I have three questions about the Tab Order that's rendered by default on an ASPX page: 1. On a page that's all ordered HTML (instead of absolute positioning), shouldn't the default be that...
0
1133
by: arora.dipti | last post by:
Hi, I am having a windows application in which i have one windows form which derives from one base form.the base form has some controls whose tabindex is set there in the form. In my derived form...
0
1040
by: Barry Flynn | last post by:
Visual Studio 2005 I have a vague recollection that it is possible to set an option which causes the TabIndex property to be displayed on each control. You could then set the required tabindex...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.