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 » Ribbon Bar size Collapse All
Subject Author Date
Vrinda Savargaonkar Apr 13, 2007 - 5:22 AM

Dear Sir / Madam

I am using prof uis v2.64. I am using ribbonbar in mdi application . Now I reduce size of ribbon bar using function
virtual INT RibbonLayout_GetGroupHeight(CExtRibbonButtonGroup * pGroupTBB) const
{
     return 30;
}
because my requirement is such that i require large screen area .
Now my question is how to palce icon & text on ribbon bar horizontally one after one .
I tried but text not appearing on ribbonbar.

Next is how to give sortcut keys to these icon & text.

Please give me solution for this or some example .

Thanks .




Vrinda Savargaonkar Apr 16, 2007 - 6:17 AM

Thanks for the quick reply that is what i want.

Technical Support Apr 13, 2007 - 12:10 PM

We would not recommend you change the default height of the ribbon bar so that it can be compatible with the original design developed by Microsoft.

There are three types of button informativeness levels supported for each button in the ribbon bar:

1) Small. Button has a 16x16 icon only.

2) Normal. Button has a 16x16 icon and a single line text on the right. We guess it is what you are looking for.

3) Big. Button has a 32x32 icon and one or two lines of text at the bottom.

Each button is connected with a ribbon node which contains behavior rules for the button. By default, the behavior rules include all three states. You can modify the rules. For example, if you remove both Small and Big states, the button will always be displayed in the Normal state. You can do this when initializing ribbon nodes at startup. Here is a code snippet:

// create a ribbon node first
CExtRibbonNode * pNodeCopy =
            new CExtRibbonNode( ID_EDIT_COPY, 0, NULL, 0, _T("Copy") );

      // remove Big and Small info levels from the behavior rules
      pNodeCopy->RibbonILE_RuleRemoveLargeILV();
      pNodeCopy->RibbonILE_RuleRemoveSmallILV();

      // assign key tip
      pNodeCopy->CmdKeyTipSet( new CExtCustomizeCmdKeyTip( _T(’C’) ), false );

      // assign icon
      VERIFY( pNodeCopy->m_iconSmall.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(ID_EDIT_COPY_SMALL) ) );
      pNodeCopy->m_iconSmall.m_bmpNormal.Make32();
      pNodeCopy->m_iconSmall.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );

      // assign screen tip (ribbon tool tip)
      pCmdScreenTip = new CExtCustomizeCmdScreenTip;
      pCmdScreenTip->CaptionMainSet( _T("Copy") );
      pCmdScreenTip->TextMainSet( _T("Copy the selection and\nput it on the Clipboard.") );
      pNodeCopy->CmdScreenTipAttach( pCmdScreenTip );

      // node is completely initialized, finally insert it into the parent node
      pRibbonGroup->InsertNode(
            NULL,
            pNodeCopy
            );
We also answered a similar question here.

Key tips are supported in v.2.64. Screen tips will be available in the next version (though you can download the latest code from our ftp server right now).