Print Page | Close Window

ShowPane bSetFocus issue ?

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=13485
Printed Date: 13 May 2025 at 7:13am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ShowPane bSetFocus issue ?
Posted By: nickpap
Subject: ShowPane bSetFocus issue ?
Date Posted: 24 February 2009 at 5:38am
Hello,

I'm currently using XTP v12.1.0 and I have an issue with CXTPDockingPaneManager->ShowPane not honoring the bSetFocus parameter.

I've created several panes and I attempt to control which ones appear depending on some conditions. I'm using ShowPane to display and ClosePane to hide each pane in turn. The problem is that ShowPane always sets the focus to the newly displayed pane, although I tried passing FALSE in the bSetFocus parameter.

This code does not work:

    this->ShowPane(pPane, pnItem->wOptions & PPI_OPT_SET_FOCUS); //pass TRUE in bSetFocus only when option is set

So, I'm using this workaround:

    if (!(pnItem->wOptions & PPI_OPT_SET_FOCUS)) //workaround to correctly manage not to set focus to shown pane
    {
        CXTPDockingPane* pActivePane = this->GetActivePane(); //get the currently selected pane
        this->ShowPane(pPane, FALSE); //doesn't seem to honor the bSetFocus parameter...
        this->ShowPane(pActivePane); //set the focus back
    }
    else
        this->ShowPane(pPane);
//use default bSetFocus = TRUE





-------------
ToolkitPro v12.1.0
Windows XP SP3 32bit
VS 2005 C/C++ MFC



Replies:
Posted By: Oleg
Date Posted: 25 February 2009 at 3:56am
Hi,
 
I tried with our PaneSample and seems it works.

try add FALSE in void CMainFrame::OnShowPane(UINT nID) method and check this sample.  Do you see same ?



-------------
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