Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » F Collapse All
Subject Author Date
Robert Webb Oct 16, 2008 - 1:47 AM

The file menu in a ribbon bar is kind of ugly and inconvenient (not your fault if just copied from MS).


For example, submenus have their entries starting at the top rather than starting at the level of the submenu selected.  Consider the Unlock menu below.  The user must move the mouse down to the item, then back up to the top to select one of its sub-items.  It’s kind of cumbersome compared with a traditional menu.  Is there an alternative you can suggest?


Also, the right part of the menu is usually just a large mostly empty space.  I’m not sure why it’s so big.  Can it be adjusted?


And finally, we handle our MRU list (most-recently used) differet from the standard way, and display something more than just the file name.  Is there a way I can change the MRU list shown on the right to contain my own items?


Thanks,

Rob.


Antonio Pelli Neto Aug 7, 2009 - 3:04 PM

I’m facing a big problem trying to include the RibbonNodeFile in the Formula Grid Sample. I tried everything including copying the example from RibbonBars, but it didn’t work. I’m moving from CodeJock to Prof-UIS, but the help really didn’t help me.


Pelli

Technical Support Aug 10, 2009 - 6:20 AM

The FormulaGrid sample application demonstrates a simplified ribbon bar layout without the ribbon file button (a.k.a. application button). Some applications do not require rich and big ribbon file menu and we just used the FormulaGrid sample application to demonstrate such ribbon bar layout. The CMyRibbonBar class in this sample application have the following implementations of the ribbon bar’s virtual methods:

 virtual bool Ribbon_FileButtonInit() { return false; }
      bool RibbonLayout_IsFrameIntegrationEnabled() const { return false; }
If you want to initialize the ribbon file menu, then you should remove these virtual methods from the CMyRibbonBar class. Then you should initialize the ribbon file button like the RibbonBar sample application does.

Antonio Pelli Neto Aug 7, 2009 - 3:03 PM

null

Antonio Pelli Neto Aug 7, 2009 - 3:03 PM

null

Technical Support Oct 21, 2008 - 1:08 PM

Please compile and run the following modified version of the RibbonBar sample we have just created for you and take a look at the usage of the stat_MyCreateRibbonGalleryItem() function in it:

http://www.prof-uis.com/download/forums/RibbonBar-Custom-Draw-File-Button-Gallery.zip

In most cases ribbon galleries contain only big icons. The stat_MyCreateRibbonGalleryItem() function creates big icons displaying text like you need.

Robert Webb Oct 23, 2008 - 1:47 AM

Is there a way to change the height of that gallery?  It seems to be a fixed height that isn’t set anywhere in the sample.  But as you can see in my original screenshot, the menu is taller than the gallery, and when there’s enough stuff in the gallery to need a scroll bar it seems a shame not to make the most of the full menu height.


Ideally I’d just want to make it the same height as the menu.


Thanks,

Rob.

Technical Support Oct 23, 2008 - 2:01 PM

Here is how the size of a gallery control of the ribbon file menu is initialized in the constructor of the CExtRibbonNodeFile class:

   m_sizePopupGalleryControl = m_sizePopupGalleryControlMin =
                        m_sizePopupGalleryControlMax = CSize( 350, 330 );

We have modified the source code of the CMainFrame::_InitRibbon_FileMenu() method in the RibbonBar sample application for increasing height of this gallery from 330 to 500 pixels:
CExtRibbonNodeFile * CMainFrame::_InitRibbon_FileMenu()
{
CExtRibbonNodeFile * pRibbonNodeFile = new CExtRibbonNodeFile;


            pRibbonNodeFile->m_sizePopupGalleryControl
                        = pRibbonNodeFile->m_sizePopupGalleryControlMin
                        = pRibbonNodeFile->m_sizePopupGalleryControlMax
                        = CSize( 350, 500 );


            pRibbonNodeFile->CmdKeyTipSet( new CExtCustomizeCmdKeyTip( __EXT_MFC_SAFE_TCHAR( _T(’F’) ) ), false );
            pRibbonNodeFile->m_keyTipOptionsButton.KeyCodeAdd( DWORD(’T’) );
            pRibbonNodeFile->m_keyTipExitButton.KeyCodeAdd( DWORD(’X’) );
. . .
You can increase/decrease the width and/or height of this gallery. The size of the second level popup sub-menus will be adjusted automatically. I.e. the second level popup sub menus will cover the gallery inside the ribbon file menu.


Robert Webb Oct 21, 2008 - 9:35 PM

Hey, this looks great, just what I needed.


Thanks,


Rob.

Technical Support Oct 18, 2008 - 10:15 AM

We assume the ribbon’s file menu is a very specific UI part. It has approximately the same size in all the applications of Office 2007 and contains approximately the same set of items. We hope it’s not our fault because the ribbon UI have not been invented by us.

First of all, the ribbon file button is a ribbon gallery. All ribbon gallery buttons display a popup menu with gallery control at top and, optionally, a set of menu items at bottom. All ribbon galleries are resizable in both directions or in vertical direction only. But the ribbon file button is an exception. Unlike other galleries, it has a specific skinned look, menu items on the left side, a gallery control on the right side, optional two buttons at bottom or one of these buttons (Options and/or Exit), popup sub menus of the menu level next to the top ribbon file gallery level also have a specific look and position, which is designed to cover gallery control. But the ribbon file gallery and other galleries use the same APIs and virtual methods. The gallery control inside ribbon file button does not contain MRU entries. It does contain what you have inserted. The CMyRibbonBar::OnRibbonGalleryInitContent() virtual method in the RibbonBar sample application initializes all the gallery controls you can come across within the ribbon bar including gallery control inside ribbon file menu. The ribbon file button is initialized at the end of this method. The ribbon gallery control (the CExtRibbonGalleryWnd class) is advanced version of Prof-UIS toolbox control (the CExtToolBoxWnd class). So, gallery items are toolbox items. You should simply initialize your MRU items as toolbox items. You should implement the CExtRibbonPage::OnRibbonGalleryItemSelEndOK() virtual method in your CExtRibbonBar-derived class to handle selection of the ribbon gallery items.

Robert Webb Oct 20, 2008 - 7:22 PM

Ah thanks, I hadn’t realised the MRU list was filled in elsewhere.  I have my MRU list working the way I want now.


Weird that the MRU menu is handled differently from other submenus though, which otherwise look similar and appear in the same place.  I’d like to show items in the MRU list similar in style to those in the SaveAs list of the ribbon sample, that is, with a bold headline and non-bold text underneath.  For menus this is done using __ECTN_BOLD_IN_MENU and SetTextMenuExtended().  Since the MRU list is done as a gallery, how would I achieve the same effect?


Thanks,


Rob.

Robert Webb Oct 16, 2008 - 1:48 AM

(Sorry, don’t know how the subject came out as just "F"!)