Print Page | Close Window

Toolbar docking question

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=3431
Printed Date: 09 November 2025 at 7:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Toolbar docking question
Posted By: yoavo
Subject: Toolbar docking question
Date Posted: 21 December 2005 at 7:07am

Hi,

I want the following behaviour on my application: When a toolbar is docked to the left or right, then its button will be shown with text & image. When a toolbar is docked to the top or bottom, then its button will be shown with image only.

How do I do it ?

Yoav.




Replies:
Posted By: Oleg
Date Posted: 21 December 2005 at 9:41am

Hi,

Try override CXTPToolbar, its CalcDockingLayout, CalcDynamicLayout

and change m_bTextBelow if dwMode & LM_VERTDOCK != 0.



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


Posted By: yoavo
Date Posted: 22 December 2005 at 12:48am
How do I create a derived CXTPToolbar ? (I create toolbars by using GetCommandBars()->Add(...) which returns a CXTPToolbar object...)


Posted By: Oleg
Date Posted: 22 December 2005 at 1:34am

Hi,

add class derived from CXTPToolbar -  CMyToolBar,

add macros in it DECLARE_XTP_COMMANDBAR(CMyToolBar) (in .h)

and IMPLEMENT_XTP_COMMANDBAR(...) (in cpp)

 

add it using

GetCommandBars()->Add(..,.., RUNTIME_CLASS(CMyToolBar));

 



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


Posted By: yoavo
Date Posted: 22 December 2005 at 9:57am

thanks !!!

It works great.




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