Increment Tab Order

R

Robert Boudra

In vb.net, if I instert a new control onto a form and I want that control
to occur in the middle of the Tab Order, how can I insert it into the tab
order and automatically increment the tabindex of all of the other controls
on the form? In VB1-6, this was done automatically, but in vb.net if I
insert a new control and give it a tab index of zero, I get two controls on
the same form with the same tabindex! I then have to manually increment all
of the tabindex values on the form.

Like hundreds of other things in vb.net, there must be a "new and improved"
way to do this, but so far I've not found it. Sometimes I get the feeling
that things were changed, just for the sake of changing them.

Bob
 
C

Carlos J. Quintero [VB MVP]

Hi Bob,

In VB "classic" the Tabindex was an "absolute" value and therefore if you
inserted some value in the middle, the others values were reassigned. In
VB.NET the TabIndex of a control is value is relative to its parent, so the
tabindex of a control is really of the form 0.2.1 and you will see
duplicates if the parent controls are different. You can see the absolute
tabindex of each control if you select the form (not a control) and click
the menu View \ Tab Order. That said, a tabindex can be duplicated even
among controls of the same parent, and in this case the Z-Order is taken
into account.

There is a TabIndex Assistant in my add-in (below) that can help you greatly
to view and set the tabindex of each control, even automatically. If you
used MZ-Tools 3.0 for VB6, it is the same tool for VS.NET

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top