Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Automatically adjust width of button on ribbon bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Automatically adjust width of button on ribbon bar

 Post Reply Post Reply
Author
Message
nttrungmt View Drop Down
Newbie
Newbie
Avatar

Joined: 15 September 2008
Location: Vietnam
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote nttrungmt Quote  Post ReplyReply Direct Link To This Post Topic: Automatically adjust width of button on ribbon bar
    Posted: 18 September 2008 at 3:35am
Hi
I have an application using ribbon bar
Caption of buttons on ribbon bar don't have same length so that I have used CXTPControl::SetWidth() to make buttons in ribbon bar same width

The ribbon display well when width of program is enough

But when i resize the main form smaller -> 3 buttons on ribbon bar will be resized like this


There are 3 buttons became horizontal with small icon + caption. But you can see the button don't display full caption anymore because the width i set before is not enough.

My question is how i handle event in which button on ribbon bar is changed style and how i can change the size of button to display all caption automatically.

I can set the maximize width for these button but in normal style (vertical icon + caption) the button is to big.

Is there any other way to handle?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2008 at 6:06am
Hello,
 
You can prevent these 3 buttons to be minimized:
pButton->SetStyle(xtpButtonIconAndCaptionBelow);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.