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 » Set the size of CExtRibbonNodeGallery Collapse All
Subject Author Date
Serge Roussel Sep 28, 2007 - 7:02 AM

I am using a CExtRibbonNodeGallery to populate icons from an item in Application menu. The gallery window is bigger than the section underneath it. If I use a scaling to set its size, I can obtain the correct size but the vertical scroll bar is only about half of that window. How can I retrieves the size of the window under it to set its size properly?

CExtRibbonNodeGallery *nodeGallery = new CExtRibbonNodeGallery(ID_OPEN_TEMPLATE, NULL, __ECTN_BIG_ACCENT_IN_MENU, _T("&Open") );
nodeGallery->CmdKeyTipSet( new CExtCustomizeCmdKeyTip( __EXT_MFC_SAFE_TCHAR( _T(’O’) ) ), false );
nodeGallery->m_nTpmxAdditionalFlags |= TPMX_COMBINE_ANY_SUITABLE;//(TPMX_RIBBON_RESIZING | TPMX_PALETTE_TB_BKGND | TPMX_RIBBON_RESIZING_VERTICAL_ONLY);
nodeGallery->m_sizePopupGalleryControl.cy = g_PaintManager.GetPM()->UiScalingDo( 58*4, CExtPaintManager::__EUIST_Y );
nodeGallery->m_sizePopupGalleryControl.cx = g_PaintManager.GetPM()->UiScalingDo( 58*4, CExtPaintManager::__EUIST_X );
nodeGallery->RibbonILE_RuleRemoveEntriesByILV( true, true, false );

Technical Support Sep 28, 2007 - 12:44 PM

Both the width of the scroll bar control and the width of ribbon gallery scroll buttons is equal to the value of ::GetSystemMetrics( SM_CXVSCROLL ). This value should be added to the measured size of the gallery and it should not be scaled. You can modify our RibbonBar sample and send it to us. We will check out what’s wrong.