Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Using ribbon color schemes with docking panes etc
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Using ribbon color schemes with docking panes etc

 Post Reply Post Reply
Author
Message
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Topic: Using ribbon color schemes with docking panes etc
    Posted: 04 February 2007 at 11:20am
When using a ribbon, following the RibbonSample example it is easy to have the general appearance use one of the blue/black/silver/aqua color schemes. In addition, any toolbars/menu bars/status bars that are present automatically take on the required colors.
 
However, neither CXTPDockingPaneManager nor CXTPTabClientWnd items seem to adjust color. How is it possible to do this?
 
Also, how can I determine the colors being used from within the application so that I can change app-specific elements to match? The GetXtremeColor(xxx) function does not seem to return different values even when the different color schemes are in operation.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 1:36am
Hi,
 
Set xtpPaneThemeOffice2007 theme for dockingpanes.
 
Check Samples\DockingPane\PaneSample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 6:02am
Hi Oleg,
 
The xtpPaneThemeOffice2007 theme is fine for the blue ribbon color, but does not update when the black/aqua/silver color schemes are used. I tested by inserting the following into a version of the RibbonMDISample that I'd incorporated the ribbon colour style code from RibbonSample:
 
    m_paneManager.InstallDockingPanes(this);
    m_paneManager.SetTheme(xtpPaneThemeOffice2007);
    m_paneManager.UseSplitterTracker(FALSE);
    m_paneManager.CreatePane(  IDS_PANEWINDOW,
                  CRect(0, 0,150, 120), xtpPaneDockLeft );
 
In the blue color, all is fine, but in black neither the docking panes nor the tab client use the same color scheme as the ribbon.
  
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 11:25am
Call
 
m_paneManager.GetPaintManager()->RefreshMetrics()
after you change color.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Posted: 05 February 2007 at 6:51pm
Excellent! This sets the docking pane color correctly. To set the tab client wnd I also needed to add the line:

m_wndClient.GetPaintManager()->RefreshMetrics();

This sets the color of the tab background correctly, but as the default is to use the OneNote color scheme it still looks odd. However, ensuring that the following is set:

m_wndClient.GetPaintManager()->SetOneNoteColors(FALSE);

gives exactly what I need. Many thanks for your help!

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.