Print Page | Close Window

RibbonBar resize behavior

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=11710
Printed Date: 10 May 2025 at 6:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: RibbonBar resize behavior
Posted By: apierini
Subject: RibbonBar resize behavior
Date Posted: 04 August 2008 at 5:23am
Hi to all,

we have CodeJock Suite Pro2008 and a question about RibbonBar: is there anyone who knows how to control the RibbonBar resize behavior? With default settings I’ve noted that reducing the RibbonBar width the texts are lost and the 32 pixel icons are resized to 16 pixel with quality loss; it would be nice to have the Microsoft Office 2007 behavior where split buttons are automatically created when the bar is too small.

Thanks in advance for any help,

Andrea Pierini 



Replies:
Posted By: Oleg
Date Posted: 04 August 2008 at 7:20am

Hi,

Check our Ribbon sample - it works like in Office 2007  - only if you have single button on group it will not work.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: apierini
Date Posted: 04 August 2008 at 12:50pm
Hi Oleg,
I better explain myself.

This is Codejock:



and



This is Word 2007:


and


Is it possible to have small icons without quality loss? I tried to give the the control a couple of bitmaps (big and small) but with no success. Is it possible to force to retain text? And is it possible to force the generation of the split button before the small icons appear?

Thanks in advance and sorry for any mistake.

Andrea Pierini


Posted By: ijwelch
Date Posted: 04 August 2008 at 8:54pm
The icon quality loss is due to not having loaded 16x16 icons for the toolbar controls in question.


Posted By: Oleg
Date Posted: 05 August 2008 at 1:32am
Hi,
 
yes, just add 16*16 icons for same Id.   our SDI Ribbon sample shows it.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: apierini
Date Posted: 05 August 2008 at 3:51am
Hi,

could you please tell me with more details how to add 16x16 and 32x32 icons for the same Id and set the CommandBar Control to show with 32x32 size when there is enough space and 16x16 when there is not enough space?

I searched through Samples\CommandBars\C#.NET\RibbonSample but couldn't find the code snipped you are referring to, where is it?

Thanks,
Andrea Pierini

PS: By the way I can compile the example but I can't run it because I always get "class not registered error"; it is very strange because I can run my application so the ocx should be registered fine.


 


Posted By: Oleg
Date Posted: 05 August 2008 at 7:40am
Hi,
 
Here code from sample:
 
   CommandBars.Icons.LoadBitmap(resDir + "SmallIcons.bmp", new int[] {ID.ID_FILE_NEW, ID.ID_FILE_OPEN, ID.ID_FILE_SAVE, ID.ID_EDIT_CUT, ID.ID_EDIT_COPY, ID.ID_EDIT_PASTE, ID.ID_FILE_PRINT, ID.ID_APP_ABOUT}, XtremeCommandBars.XTPImageState.xtpImageNormal);
   CommandBars.Icons.LoadBitmap(resDir + "LargeIcons.bmp", new int[] {ID.ID_EDIT_PASTE, ID.ID_EDIT_FIND, ID.ID_PAGES_NEW, ID.ID_PAGES_COVER, ID.ID_PAGES_BREAK, ID.ID_TABLE_NEW, ID.ID_ILLUSTRATION_PICTURE, ID.ID_ILLUSTRATION_GRAPHIC, ID.ID_ILLUSTRATION_CHART, ID.ID_INSERT_HEADER, ID.ID_INSERT_FOOTER, ID.ID_INSERT_PAGENUMBER, ID.ID_TEXT_TEXTBOX, ID.ID_TEXT_PARTS, ID.ID_TEXT_WORDART, ID.ID_TEXT_DROPCAP, ID.ID_SYMBOL_EQUATIONS, ID.ID_SYMBOL_SYMBOL}, XtremeCommandBars.XTPImageState.xtpImageNormal);


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: apierini
Date Posted: 06 August 2008 at 10:58am
Thanks a lot, I was able to load both icons.
Regards,
Andrea Pierini



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