Print Page | Close Window

different size Buttons in CXTPToolBar

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=2614
Printed Date: 06 October 2024 at 12:46am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: different size Buttons in CXTPToolBar
Posted By: Wolfgang
Subject: different size Buttons in CXTPToolBar
Date Posted: 21 July 2005 at 9:34am

Hi,

again a question. I use the CXTPToolBar, so far it worked really nice, but now i would need to add a larger (ie. wider) Button. the normal buttons are 16*16, but one should be 40*16

I thought that

CBitmap bmp;

UINT command=ID_LINKS_SENDING;

bmp.LoadBitmap(IDB_SENDINGBMP);

pCommandBars->GetImageManager()->RemoveIcon(command);

pCommandBars->GetImageManager()->SetIcons(bmp, &command, 1, CSize(41,16)); // set a new (larger) icon for the Sending

would do the trick

It changes the Icon, but the Button still stays 16*16, which means that the Bmp in the Button is shrinked to fit.

Is there a way to enlarge one Button in the Toolbar?

thanks in advance

Wolfgang




Replies:
Posted By: Oleg
Date Posted: 21 July 2005 at 11:23pm
pToolBar->SetIconSize(CSize(41,16));

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


Posted By: Wolfgang
Date Posted: 22 July 2005 at 2:54am

this doesn't do the trick.

It makes all buttons that size, i need one Button to be 41*16, the rest schould be 16*16

Does Codejock offer a way to use such a feature? So far I haven't found anyclue for it, in the documentation.

Thanks in advance

Wolfgang



Posted By: Oleg
Date Posted: 22 July 2005 at 1:19pm

Hi, see attached sample.

http://forum.codejock.com/uploads/oleg/2005-07-22_131850_CustomButton.zip - 2005-07-22_131850_CustomButton.zip



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


Posted By: Wolfgang
Date Posted: 18 August 2005 at 9:57am

thanks for your help it works quite fine!!

Nevertheless one more question. Is there a way to place some sapce between some buttons.

E.g. I have to seperate the last Button of the Toolbar from the others. (not via a Seperator but with actual space (20-30 Pixel) of just toolbars.

My first idea was to insert a Button which is always disabled and with no icon.

but maybe there is a more readable way too?

thanks in advance

Wolfgang




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