Tab Order doesn't work or reversed.

L

lomegah

I have a Windows application written in c#. I use the framework 3.5.
This application load pluggin (Class library) written in c# with the
framework 3.5 too. Each plugin is loaded in a separated Domain. I
try to create a windows form with some textboxes. I don't know why
but the Tab Order is reversed.

Problem #1:
3 Textbox, with Tab Order 0, 1, 2. The first TextBox selected is the
0, and if I press TAB Key, the focus go in the 2 and after 1, and
after 0, etc. The problem is on many computers. (I use 64 bits
computers).

Problem #2:
If I want to "simulate" MDI with my settings, when I open a form, the
main MDI form capture an event and call SetParent of User32, and
SetWindowPos. If I try this, this is the end of Tab Key, Tab Order
doesn't work in all controls of my form.

Any ideas ?
 
R

Rich Bamford

I have been experimenting with the add-in support in 3.5 in order to implement plug-in modules containing forms. I too have run into the reversed tab order issue - so far with no real solution.

I'm passing the main (host) window to the add-in as an IWin32Window (I.e. the handle) as the Form class relies on static data so won't work properly over process/AppDomain boundaries.

If the add-in just shows it's form (I.e. not linked to the host in any way) the tab order is reversed.

If the add-in makes it's form a child (owned by) the host form the tabs are still reversed. Apart from that it seems to behave as a normal modeless child.

If the add-in opens its form as an owned dialog (modal) then all seems to work fine - the tab order is as expected etc.

This seems very similar to the issues when hosting .NET forms in MFC apps in the early days :(
I'm hoping there's a simple fix as I really don't want to amend tab orders at runtime.



Posted as a reply to:

Tab Order doesn't work or reversed.

I have a Windows application written in c#. I use the framework 3.5
This application load pluggin (Class library) written in c# with th
framework 3.5 too. Each plugin is loaded in a separated Domain.
try to create a windows form with some textboxes. I don't know wh
but the Tab Order is reversed

Problem #1
3 Textbox, with Tab Order 0, 1, 2. The first TextBox selected is th
0, and if I press TAB Key, the focus go in the 2 and after 1, an
after 0, etc. The problem is on many computers. (I use 64 bit
computers)

Problem #2
If I want to "simulate" MDI with my settings, when I open a form, th
main MDI form capture an event and call SetParent of User32, an
SetWindowPos. If I try this, this is the end of Tab Key, Tab Orde
doesn't work in all controls of my form

Any ideas ?

EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorial...a-6dafb17b6d74/wcf-workflow-services-usi.aspx
 
R

Rich Bamford

What it appears to be doing in my case is ignoring the tabindex values (which still appear correct) and using the order in which the controls appear in their container (E.g. the form's control collection).



Posted as a reply to:

Tab order doesn't work or reversed.

I have been experimenting with the add-in support in 3.5 in order to implement plug-in modules containing forms. I too have run into the reversed tab order issue - so far with no real solution.

I'm passing the main (host) window to the add-in as an IWin32Window (I.e. the handle) as the Form class relies on static data so won't work properly over process/AppDomain boundaries.

If the add-in just shows it's form (I.e. not linked to the host in any way) the tab order is reversed.

If the add-in makes it's form a child (owned by) the host form the tabs are still reversed. Apart from that it seems to behave as a normal modeless child.

If the add-in opens its form as an owned dialog (modal) then all seems to work fine - the tab order is as expected etc.

This seems very similar to the issues when hosting .NET forms in MFC apps in the early days :(
I'm hoping there's a simple fix as I really don't want to amend tab orders at runtime.

EggHeadCafe - Software Developer Portal of Choice
WCF Workflow Services Using External Data Exchange
http://www.eggheadcafe.com/tutorial...a-6dafb17b6d74/wcf-workflow-services-usi.aspx
 

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