TabOrder problem

  • Thread starter Thread starter Atley
  • Start date Start date
A

Atley

How do I set the TabOrder for controls in my VB.net 2003 app? I just don't
get this... I have tried to order the creation of the objects in the code
in the order I want them to tab in to no avail. Any suggestions?

Atley
 
What version of the .NET CF are you using? Tabbing itself is working, but
the order isn't what you want? You're testing that on the device, not in
the emulator, right?

Paul T.
 
It's set by ZOrder, which by default is the reverse of the order they are
added. It only works on SP2.
 
I am using the new SP2 version of CF... The tabbing is working, but as you
said the order is messed up. I just want it to tab from one control to the
control directly beneath it.
 
You didn't mention whether you are using the emulator or a real device...

Paul T.
 
Then you should be able to just change the order in which items are added to
this.Controls in the form's InitializeComponent() method. As Chris said,
add them in the reverse order you want to tab through them.

Paul T.
 
I have tried that now, put them in reverse order than what I wanted them to
tab in and it didn't work, so I put them in the exact order that I wanted
them to tab in and that didn't work... They always tab in exactly the
oposite order than what I need them to tab in.

Atley
 
I can find no problems with tabbing at all, other than the order, which
appears to follow the order of insertion, rather than its reverse.

That is, if, in my InitializeComponent() routine, I have the following:

this.Controls.Add(this.textBox1);

this.Controls.Add(this.textBox2);

this.Controls.Add(this.textBox3);

this.Controls.Add(this.QuitButton);

this.Controls.Add(this.AnotherFormButton);

Then, the tab order will be textBox1, textBox2, textBox3, QuitButton, and
AnotherFormButton, in that order (if you focus textBox1, then hit tab, tab,
textBox3 will then be focused).



I also have no problems using a tab control. Tabbing through the controls
eventually selects the currently active tab and I can use the arrow keys to
switch from tab to tab.



Paul T.

I have tried that now, put them in reverse order than what I wanted them to
tab in and it didn't work, so I put them in the exact order that I wanted
them to tab in and that didn't work... They always tab in exactly the
oposite order than what I need them to tab in.

Atley

Paul G. Tobey said:
Then you should be able to just change the order in which items are
added
to
this.Controls in the form's InitializeComponent() method. As Chris said,
add them in the reverse order you want to tab through them.

Paul T.
but
as
you
said the order is messed up. I just want it to tab from one
control
to
the
control directly beneath it.



"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com>
wrote
in
message What version of the .NET CF are you using? Tabbing itself is working,
but
the order isn't what you want? You're testing that on the
device,
not
in
the emulator, right?

Paul T.

How do I set the TabOrder for controls in my VB.net 2003 app? I
just
don't
get this... I have tried to order the creation of the objects in
the
code
in the order I want them to tab in to no avail. Any suggestions?

Atley
 
Back
Top