Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Quick Access Separators
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Quick Access Separators

 Post Reply Post Reply
Author
Message
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Topic: Quick Access Separators
    Posted: 12 November 2008 at 9:55am

My designers would like a separator capability on the quick access toolbar.  Something like this:

 
or this
 
 
I tried calling BeginGroup on a couple of controls, and got this.
 
 
That is servicable but not as aesthetically pleasing as I was hoping.  Is there any way to add some spacing around the bar to give a more obvious separation?  Is the second picture in my wish list even remotely possible?
 
Thanks.
 
--Mike
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: 13 November 2008 at 2:38am
Thanks, please patch our sources - insert
 
  if (pControl->GetBeginGroup())
   nLeft += 6;
in CXTPRibbonBar::Reposition
 
before "if (!bSpecial && (nLeft + szControl.cx > nRight))"
 
Its changed for next release too.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2009 at 11:08am

This is working out well for me.  One question has been raised by my UI specialists.  When docked above the ribbon, the separator is a couple of pixels too high, as shown below:

 
It looks fine when docked below the ribbon. 
 
 
I think I've found the code that draws this in CXTPOffice2003Theme::DrawCommandBarSeparator.
 
...
else if (pBar->GetPosition() == xtpBarTop || pBar->GetPosition() == xtpBarBottom || bSkipWrapSeparators)
 {
  if (!pControl->GetWrap())
  {
   Line(pDC, rcControl.left - 4, rcRow.top + 4, rcControl.left - 4, rcRow.bottom - 4, XPCOLOR_SEPARATOR);
   if (!m_bPlainSeparators) Line(pDC, rcControl.left - 3, rcRow.top + 5, rcControl.left - 3, rcRow.bottom - 3, COLOR_3DHIGHLIGHT);
  }
...
 
It looks like rcRow.top is what I want adjusted, but I don't see how to isolate the "above" case from the "below" case.  Additionally, it looks like this function is used by popup menus as well, and I don't want to hose those up.  Any suggestions for cleaning this up?
 
 
--Mike
Back to Top
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Posted: 23 January 2009 at 11:46am
Any thoughts on this?
--Mike
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.