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 » minimum width on a ribbon button Collapse All
Subject Author Date
Dominik Braendlin Jul 20, 2010 - 2:35 AM

Dear Tech Support,

I would like to specify a minimum width on a ribbon button which is using the __ECTN_DYNAMIC_POPUP flag. The purpose is to have three ribbon buttons underneath each other having the same width although the containing text may vary in width.

Is this possible and if how do I do it. Could you please give an example?

Thanks

Adrian

Technical Support Jul 20, 2010 - 4:50 AM

First of all, you should implement a CExtRibbonButton-derived class and override its CExtBarButton::RibbonILV_CalcSize() method. Your method should invoke the parent class method and then return a computed size with the width that is not less than the minimal width you need. Second, you should create and use your CExtRibbonNode-derived class which returns RUNTIME_CLASS of your ribbon button class from the overridden CExtRibbonNode::_OnRibbonGetButtonRTC() virtual method. You should use the ribbon node for all your buttons which should use the required minimal width restriction.