Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Getting tab order to work correctly with a Dialog->Tab Control->Dialog Collapse All
Subject Author Date
Scott Moore Jun 13, 2008 - 9:20 AM

We have several CExtResizeableDialog classes that contain a CExtTabPageContainerWnd which contains 1 or more CExtResizeableDialog.


The problem is the tab order doesn’t work correctly.  You can tab around inside the inner dialog, but it will never jump out to the OK/Cancel buttons.  We changed a few things and now we can tab around the inner dialog and when it reaches the bottom control, it does jump out to the OK/Cancel button.  But once it reachs OK/Cancel, it just keeps moving from OK to Cancel and back.  It doesn’t go back into the inner dialog.  And Shift-tab immediately jumps to the Cancel button, no matter which inner dialog control had the focus.


How can we fix the tab order to work like it should?

Scott Moore Jun 14, 2008 - 8:59 AM

I did as you said but it didn’t work until I added the DS_CONTROL style to the inner dialog with the controls.  I added the WS_EX_CONTROLPARENT to the tab control and the outer dialog.  But it’s only completely working in 1 of my 3 dialogs.



The other 2 dialogs, Shift-Tab works fine and cycles thru all the controls on the inner dialog and back out to the OK/Cancel buttons, then back to the inner dialog controls.



The problem is the Tab key does not go back into the inner dialog.  Once it reaches the OK/Cancel buttons, it only cycles thru them.  What would cause such behavior?

Technical Support Jun 14, 2008 - 3:37 AM

Please add the WS_EX_CONTROLPARENT extended window style to the tab page container window and its child dialog page windows. This style will make tab order working between the dialog window which is the parent of the tab page container window and the dialog page windows inside the tab page container.

Scott Moore Jun 14, 2008 - 8:59 AM

I did as you said but it didn’t work until I added the DS_CONTROL style to the inner dialog with the controls.  I added the WS_EX_CONTROLPARENT to the tab control and the outer dialog.  But it’s only completely working in 1 of my 3 dialogs.




The other 2 dialogs, Shift-Tab works fine and cycles thru all the controls on the inner dialog and back out to the OK/Cancel buttons, then back to the inner dialog controls.




The problem is the Tab key does not go back into the inner dialog.  Once it reaches the OK/Cancel buttons, it only cycles thru them.  What would cause such behavior?

Technical Support Jun 16, 2008 - 6:47 AM

Thank you for reporting this problem. It’s hidden in the DefDlgProcA()/DefDlgProcW() functions rather than in Prof-UIS. We spent 5-6 hours after reading this message and we coded our own VK_TAB key processing code for the CExtResizableDialog class and it will be added in v.2.84. Here is the updated version of the ProfUIS_Controls sample which demonstrates the complex focus changing based on the new VK_TAB key processing code:

ProfUIS_Controls-284-tab-order-demo.zip

You can requested the updated source via email.