Print Page | Close Window

Pressing control tab to attached panes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=3516
Printed Date: 12 December 2024 at 5:38am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pressing control tab to attached panes
Posted By: nguyena1
Subject: Pressing control tab to attached panes
Date Posted: 16 January 2006 at 11:14am

Hey guys, I was wondering if there is an automatic way to press control tab and have it move within tabbed panes in an attached pane. 

I figure there should be a very easy solution, some flag to toggle, since cxtpdockingpanetabbed container is derived from cxtptabmanager.  If not, is the best way to do it to follow how you(Oleg) did it in the follow link?

https://forum.codejock.com/forum_posts.asp?TID=619&KW=control+tab+attached - https://forum.codejock.com/forum_posts.asp?TID=619&KW=co ntrol+tab+attached

 




Replies:
Posted By: Oleg
Date Posted: 16 January 2006 at 12:10pm

Hi,

Did you try code in this old solution? I just replace VK_F6 to VK_TAB and it works.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: nguyena1
Date Posted: 16 January 2006 at 3:24pm

Well, yes I tried it in the mainfrm but, well this is probably a newb mistake of me but, for the message WM_KEYDOWN, i get that if i click the main app and press ctrl tab.  But if i click on an individual pane(give the individual panes focus), my mainfrm doesnt receive the message(put a breakpoint inside WM_KEYDOWN).  

So I put the code inside of CMyFormView.  At first it looks like it works.  It switches panes within the attached pane.  I actually added next to pSelected->Select(); pSelected->SetFocus();   However, say you have declared 3 CMyFormView called m_ViewControl1, m_ViewControl2, and m_ViewControl3, which are individual docking panes. 

Take these 3 panes and attach them together.  Say right now you the 1st pane clicked.  You press Ctrl-Tab.  It looks like the 2nd pane is now selected(and focused).  But the 2nd pane actually isn't focus.  If you press ctrl-tab again, m_ViewControl2's PreTranslateMessage should be called, but in actuality, m_ViewControl1's is being called(checked by putting a break point there and checking the m_ID). 

In mainfrm I have something that is based on which pane has focus(pDockingPane->IsFocus() and displays ,m_ID of that class.  Well when ever you ctrl tab, it correctly displays each pane in the attached pane container because it is based on GetSelected().  However, on my main app, it is still displaying the integer from the 1st pane i had clicked on.  If you click on each attached pane, it has the correct focus, but ctrl tabbing does not give the right focus to each pane. 

Is this because I am trying to SetFocus to another pane from within my viewcontrol? 

All in all, I was just thinking that there might be a simpiler solution if it already automatically ctrl-tab's just like in a tabmanager. 



Posted By: Oleg
Date Posted: 17 January 2006 at 1:12am

Hello,

You don't need catch WM_KEYDOWN, you need to override PreTranslateMessage.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net