Print Page | Close Window

Additional button in DockingPane titlebar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=258
Printed Date: 18 June 2025 at 5:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Additional button in DockingPane titlebar
Posted By: David
Subject: Additional button in DockingPane titlebar
Date Posted: 02 December 2003 at 4:35am

I'd like to add an additional button to the titlebar of an XTPDockingPane. Which is the best way to do this?

---

UPDATE: In the meantime I implemented additional caption buttons without touching the codejock sources, but during testing I encountered several difficulties due to a lack of events and context information. For example there is no way to determine the number of panes in a CXTPDockingPaneSplitterContainer. I need this to determine, which parent window of the CXTPDockingPane I have to subclass(GetChild()->GetParent() or GetChild()->GetParent->GetParent()) to show the extra buttons in the correct location: either in the caption (non-client area) of the hosting floating window or in the caption of the docking pane (client area). Every CXTPDockingPane seems to be hosted by a CXTPDockingPaneTabbedContainer and one or more CXTPDockingPaneSplitterContainers, some of which can be empty. There doesn't seem to be an easy way to determine, in which window the caption is drawn.

All I'd need would be a simple thing like a GetPanes() method in CXTPDockingPaneSplitterContainer as exists in CXTPDockingPaneTabbedContainer. Btw. shouldn't both classes inherit from a common parent class CXTPDockingPaneContainer?

Now I am looking into further ways to determine, where to draw the caption buttons. Any hint would be very appreciated.

---

Another UPDATE: I found a very simple solution: I can simply ask the CXTPDockingPaneTabbedContainer, if IsTitleVisible(), which is exactly, what I want to know. Sometimes, it's easier than you think. Now I have my buttons working in any dock, undock, floating and whatever situation. =)




Replies:
Posted By: ferduva
Date Posted: 24 September 2012 at 8:16am
Please I want add a button near the [x] button into not client area. Can yuo give me an example?
Thanks




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