Sunday, June 26, 2005

Tab Order

I created my own custom widget and am having trouble using the SMT5600 "joystick" to navigate to it. I thought it might be an issue with tab order...

The .NET Compact Framework supports tabbing between controls with Service Pack 2 and later, but requires that you explicitly use the Focus method on the first control that should receive the focus.
The .NET Compact Framework does not support the TabIndex and TabStop properties or the UpdateZOrder method, but you can design your application to have a predictable tab order and explicitly set controls to receive focus. The up and down navigation follows the tab order.


The default tab order follows the sequence of focusable controls as they are added in code to the Controls collection.


Note that the forms designer creates the Controls collection in reverse order of when the controls were added to the form. For example, if TextBox1, TextBox2, and TextBox3 are added to the form in that order, then first control in the Controls collection is TextBox3. The following Visual Basic example shows designer-generated code in the InitializeComponent method of a form.

(from MSDN -- scroll down to bottom)

No comments: