473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Tab key makes Random selection of the controls placed on form ?????

Hi

When I press the Tab key the controls on the form are not accessed sequentially.
Why is it so?

What should I do to make a sequential selection of the controls placed on the form.

Regards
Vishwas
Aug 28 '07 #1
4 1521
hariharanmca
1,977 1GB
When I press the Tab key the controls on the form are not accessed sequentially...
1. Select any control and press F4 then property window will open.
2. Set TabIndex between 0 to <Your Index order> by clicking other controls
Aug 28 '07 #2
Killer42
8,435 Expert 8TB
The tab order is determined by the TabIndex property of each control.

How you set them depends on what version of VB you are using, as well. For example, the VBA which is built into MS Access has an option to automatically assign the tab order of all the controls in one go. This is a very handy feature, but I don't believe it exists in VB6. It may have been added into the VB.Net versions. Once you have done the"auto set", you can then modify them if you don't agree with the order.

In VB6, the trick to getting it right and saving time is to set the TabIndex of the controls in reverse order. By that, I mean you start by clicking the control that should get the focus last - this is frequently something like a Cancel button.

Then you select TabIndex in the properties window, and type "0" (without the quotes, obviously). Then, without bothering to press Enter, click the next-to-last control. Type "0" again. Click the 3rd-last control, and type "0". And so on, until you get all the way back to the first control on the form. You see, each time you set the TabIndex property of a control, it will increase the rest of them to make room. So if you start with the last one like this, and set them all to zero, you end up with them all in the correct sequence.
Aug 28 '07 #3
Robbie
180 100+
It may have been added into the VB.Net versions.
In .NET, there's some menu option to assign the tab order. Once you've chosen it, a little number appears next to each control, and you click on each of the numbers in the order in which you want the tab to cycle through, and it changes the numbers to be in that order... if you see what I mean.

Sort of like a semi-automated version of the VB6 way of changing tabbing order.
Aug 30 '07 #4
Killer42
8,435 Expert 8TB
... Sort of like a semi-automated version of the VB6 way of changing tabbing order.
Sounds like quite an improvement. Thanks for the info.
Aug 30 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Alistair | last post by:
Hello folks... this is my first post in here. I'm new to ASP having done all my previous work in Flash and bog standard HTML. Only been learning for a couple of weeks. anyway...I have been...
15
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange)...
0
by: DFS | last post by:
This works fine for me, and is very useful. You can't nest tab controls on each other, so: * start with main form * tab control 1 is placed on main form * subform 1 is placed on tab control 1...
0
by: Shailaja Kulkarni | last post by:
Hi All, I am new to component development. I want to create custom control to arrange contained controls in form of polygonal shape. The objects are placed in separate panel on the some form....
4
by: Milsnips | last post by:
hi there, i have a strange problem. I want to programatically loop through each control on a page, but am having issues. my test example: 1. header.ascx - the ascx control finds all the...
7
by: astro | last post by:
I am not farmilar with the object model for webforms. I want to loop through the web form controls - pulling out the checkboxes on the form like the following: For Each ctrl In Me.Controls ...
19
by: Boris Borcic | last post by:
does x.sort(cmp = lambda x,y : cmp(random.random(),0.5)) pick a random shuffle of x with uniform distribution ? Intuitively, assuming list.sort() does a minimal number of comparisons to ...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
7
by: Orv | last post by:
I have a "Yes/No" combo box (set to required) and I want the focus to shift to differnet controls (on the same form) based on the selection of "Yes" or "No". Would this have to be placed on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.