Connecting Tech Pros Worldwide Forums | Help | Site Map

Increment Tab Order

Robert Boudra
Guest
 
Posts: n/a
#1: Nov 21 '05
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



Carlos J. Quintero [VB MVP]
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Increment Tab Order


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

"Robert Boudra" <rboudra@comcast.net> escribió en el mensaje
news:uyJmM5nyFHA.2880@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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
>
>[/color]


Closed Thread


Similar Visual Basic .NET bytes