Set Tab Order in a Hurry

Set Tab Order in a Hurry

Setting up the control tab order can be unruly-a sore point with many VB developers. In fact, in Jeff Hadfield’s recent editorial, “Five Things You Hate About VB6” [Editor’s Note, VBPJ April 1999], it’s listed as one of the top five things people hate most about VB.

I’ve never understood this; it’s never been a big deal to me. But many people are shocked when I show them how I lay out tab orders, and are even embarrassed they didn’t think of it themselves. I don’t worry about the tab order until I’ve placed all the controls on the form, then I order them.

Now for the slam in the face: Think backwards. While viewing your form, click on the control you want to be the last control in the tab order. Highlight the TabIndex property in the Properties window and change it to zero. Now click on the control that you want to have the focus before that one, and repeat the process. Repeat this process until you reach the control that should have focus when the form opens.

Here’s why this works: VB does most of the work for you. VB automatically reassigns the tab orders if you change the TabIndex property of a control. Because you started by setting the tab index of the last control first, VB increments the last control’s tab index as you set the rest of the controls. It’s a heck of a lot easier to set the tab index to zero while you’re going through the order. I can rip through a form with more than 50 controls in about two minutes using this technique.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes