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 General Discussion » Ribbon Gallery button cannot wrap Collapse All
Subject Author Date
Chad Mueller Oct 11, 2007 - 11:30 AM

I’ve noticed an issue with CExtRibbonNodeGallery. If you turn on "wrapping" in the Rules, then the gallery is placed directly into the Ribbon Group (rather than a button that pops up the Gallery). This places sever limitations on formatting gallery buttons in the Ribbon. To see an example of this behavior, in the Ribbon Bar example, change the rules for the ID_FONT_UNERLINE button as shown below:

CExtRibbonNodeGallery * pNodeFontUnderline = new CExtRibbonNodeGallery( ID_FONT_UNDERLINE );
    pNodeFontUnderline->CmdKeyTipSet( new CExtCustomizeCmdKeyTip( _T(’3’) ), false );
    pNodeFontUnderline->RibbonILE_RuleArrayGet().RemoveAll();
    VERIFY( pNodeFontUnderline->m_iconSmall.m_bmpNormal.LoadBMP_Resource( MAKEINTRESOURCE(ID_FONT_UNDERLINE) ) );
    pNodeFontUnderline->m_iconSmall.m_bmpNormal.Make32();
    pNodeFontUnderline->m_iconSmall.m_bmpNormal.AlphaColor( RGB(255,0,255), RGB(0,0,0), 0 );
                        pCmdScreenTip = new CExtCustomizeCmdScreenTip;
                        pCmdScreenTip->CaptionMainSet( _T("Underline") );
                        pCmdScreenTip->TextMainSet( _T("Underline the selected text.") );
                        pNodeFontUnderline->CmdScreenTipAttach( pCmdScreenTip );
                        pNodeFontUnderline->CmdScreenTipSet( pCmdScreenTip, true, false );
    pRibbonNode_FontAttributes1->InsertNode(
        NULL,
        pNodeFontUnderline
        );
CArray < DWORD, DWORD > & arrRuleFontUnderline = pNodeFontUnderline->RibbonILE_RuleArrayGet();
    arrRuleFontUnderline.RemoveAll();
    arrRuleFontUnderline.Add(
        __EXT_RIBBON_MAKE_RULE_ARRAY_ENTRY(
            __EXT_RIBBON_ILE_MAX,
            __EXT_RIBBON_ILV_SIMPLE_SMALL,

             false //was true

            )
        );


So is there a way to have a CExtRibbonNodeGallery button "wrap" the way that a simple button would?

Thanks.

Technical Support Oct 12, 2007 - 6:27 AM

The Font Underline gallery button really cannot wrap the row of toolbar like buttons because it’s not placed inside the Font ribbon group: its real parent button is the pRibbonNode_FontAttributes1 tool button group which is A container button for the Bold, Italic, Font Underline and Strikethrough buttons. This container button is enabled for programmable wrapping. The children of such container buttons are not wrap-able. We have described wrapping specifics for toolbar like ribbon button groups. Simple ribbon button groups have simpler layouts: the clickable buttons have their ribbon group as the direct parent (see Style and Find groups) and, as a result, all the simple ribbon buttons are wrap-able.