Print Page | Close Window

[Closed] Question: Show / Hide Logic

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


Topic: [Closed] Question: Show / Hide Logic
Posted By: Simon HB9DRV
Subject: [Closed] Question: Show / Hide Logic
Date Posted: 22 October 2005 at 5:04am

Imagine a standard MDI application with a single docking window where the docking window (the CodeJock calendar) is displayed and selected:

The question: as the calendar is active, what should you user do to hide it? I've not really come up with a good solution other than:

* Add a button next to the pin to hide (not [X] close) the window.
* If you click on the title bar (where the calendar text and pin is displayed) then the window should hide itself.

But what's the advice from those who know? Clicking in the MDI views is not an option.

Thanks for the excellent software,



-------------
Simon HB9DRV



Replies:
Posted By: Simon HB9DRV
Date Posted: 25 October 2005 at 3:08am

FWIW I have looked at CXTPDockingPaneAutoHidePanel::OnLButtonDown and changed the logic so that clicking on the tab of a selected pane which has focus results in the pane being closed, this way I have acheived what I want.

void CXTPDockingPaneAutoHidePanel::OnLButtonDown(UINT /*nFlags*/, CPoint point)
{
 CXTPDockingPane* pPane = HitTest(point);
 if (pPane)
 {
  if (m_pActiveWnd && m_pActiveWnd->m_pPane->GetSelected() == pPane)
  {
#pragma message ("*** OnLButtonDown changed ++" __FILE__)
   //
   // New - if focus then hide.
   //
   if (pPane->IsFocus())
   {
    CloseActiveWindow();
    KillTimer(TID_SLIDEIN);
   }
   else
    pPane->SetFocus();

   //
   // Original.
   //
   // pPane->SetFocus();
#pragma message ("*** OnLButtonDown changed --" __FILE__)

  } else
  {
   CloseActiveWindow();
   ShowPane(pPane);
  }
 }
}



-------------
Simon HB9DRV


Posted By: mrmathis
Date Posted: 03 March 2010 at 4:28pm
I was looking for a way to cause a pane with focus to collapse, and this fit my bill.  I implemented it by subclassing CXTPDockingPaneAutoHidePanel and catching OnLButtonDown, rather than changing Codejock code.  I'm not wild about either approach, though, since both leave me vulnerable to changes from Codejock.  Since the original posts are old, I'm wondering whether some better way to do this might be available now?
 
 


-------------
--Mike



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