dockpanel-suite

DockPanel Suite: Alter Control+Tab order


I'm trying to alter the order of the tabs which appear when using Control+Tab inside an application with several documents using DockPanel Suite.

To be exact, I'm willing to get a behaviour like Visual Studio. That is, if you have in example, documents 1, 2 and 3, being at document 1, pressing "Control+Tab" once brings you to document 2. If you now release the control key, and then press "Control+Tab" again, the document 1 pops. In general terms, VS stores the latest selected tabs and Control+Tab cycles through them in the order they were accessed previously

Is there a way to do so? (preferably without modifying the source code, but if needed I can try to change it)

thanks!


Solution

  • I used ProcessCmdKey in the main form in order to handle Ctrl+Tab and Ctrl+Shift+Tab myself, and returning true so that the key is not handled by DockPanel Suite. Then it's just a matter of handling the order of documents myself, and showing/hiding documents when Ctrl+Tab is pressed