Print Page | Close Window

Automatically adjust width of button on ribbon bar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12185
Printed Date: 08 July 2024 at 1:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Automatically adjust width of button on ribbon bar
Posted By: nttrungmt
Subject: Automatically adjust width of button on ribbon bar
Date 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?



Replies:
Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net