![]() |
Toolbar docking question |
Post Reply
|
| Author | |
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Topic: Toolbar docking questionPosted: 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. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
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...)
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Posted: 22 December 2005 at 9:57am |
|
thanks !!! It works great. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |