开发者

.NET 3.5 Forms - Plugin Arch. - Modules in different AppDomains - TabOrder doesn't work

开发者 https://www.devze.com 2023-02-03 22:01 出处:网络
I am developing an application that is totally modular. These modules are in different .dlls and run in different application domains.

I am developing an application that is totally modular. These modules are in different .dlls and run in different application domains.

The module forms are loaded without any connection with the host form (they are not modal, neither owned, they are just instanciated variables that are shown.

The problem is that the Tab order in the module forms is totally wrong. They simply don't work or are sometimes reversed. I think that the order used is the one in which the controls are added to their container...

I already found a reference to the problem here: http://www.pcreview.co.uk/forums/thread-3512493.php

Is there any way to make this tab order work?!开发者_如何学C

Thank you very much for your help.


This is entirely normal. The tab order is set by the controls' TabIndex property. It starts out at 0 and increments each time you add a new control. Winforms otherwise has no way to guess that you want a different order.

Short from editing the TabIndex values, you can use View + Tab Order to set it quickly. You'll see light blue numbers that indicate the current order. Click the controls in the order you want.

If these controls are added at runtime then it is up to you to write the code to set their TabIndex property correctly.


I thank you very much for your reply, but I already did it and it doesn't work. Here is an image of the Tab View:

EDIT: Well I can't upload a picture to http://i.imgur.com from work. Anyway, the picture was a screenshot from Visual Studio 2010's Tab View showing the tab order corretly set.

I don't know if I understood you correctly, but are you saying that I should write the code to set the tab order on the form's load event, simply because I instanciated the form manually?

Thank you for your help.

0

精彩评论

暂无评论...
验证码 换一张
取 消