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.
Subject |
Author |
Date |
|
Chun Pong Lau
|
Oct 5, 2006 - 6:54 AM
|
Dear support team,
Is it possible to change the height of a ribbon bar in CExtRibbonBar?
Thanks in advance, Alan
|
|
Chun Pong Lau
|
Oct 6, 2006 - 10:50 AM
|
Yes. This is what I need. Thank you very much!
Alan
|
|
Technical Support
|
Oct 5, 2006 - 9:43 AM
|
You can override the CExtRibbonPage::RibbonLayout_GetGroupHeight() virtual method to change the height of the ribbon group. You can override the CExtRibbonBar::RibbonLayout_GetTabLineHeight() virtual method to change the height of the tab line.
|
|
Chun Pong Lau
|
Oct 5, 2006 - 11:27 AM
|
Thanks for your response but after I added the code in my example as below (which use only 1 CExtRibbonBar) but it have no effect on changing its height.
class CMyExtRibbonBar : public CExtRibbonBar{ INT CMyExtRibbonBar::RibbonLayout_GetTabLineHeight() const { ASSERT_VALID( this ); INT nRetVal = PmBridge_GetPM() ->Ribbon_GetTabLineHeight( this ); nRetVal = 10; // modified return nRetVal; } };
The nRetVal changes from 24 to 10 in my case but it have no effect at all.
What I mean is the size of whole ribbon bar with lightblue gradient color in my UI. Can I change its size in height? Thanks.
Regards, Alan
|
|
Technical Support
|
Oct 6, 2006 - 5:29 AM
|
Please try to add the following method to the CMyRibbonBar class in the RibbonBar sample to see what you need: class CMyRibbonBar : public CExtRibbonBar
{
virtual INT RibbonLayout_GetGroupHeight(
CExtRibbonButtonGroup * pGroupTBB
) const
{
pGroupTBB;
return 300;
}
. . .
|
|