![]() |
Different bitmaps for menus and toolbar? |
Post Reply ![]() |
Author | |
swautier ![]() Newbie ![]() Joined: 05 November 2007 Location: Belgium Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 05 November 2007 at 10:19am |
Env.: XTP 11.20 VS2003
Hi,
I have a toolbar with big images (24x24). It works fine, including loading the separate image list for disabled buttons.
How do I specify a different image list/bitmap for the small images displayed in the menus (for the corresponding items)? (and one for small disabled images).
TIA,
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Just same.
XTPImageManager()->SetIcons(IDR_MAINFRAME, IDR_TOOLBAR_SMALL, xtpImageNormal); XTPImageManager()->SetIcons(IDR_MAINFRAME, IDB_TOOLBAR_SMALL_GRAY, xtpImageDisabled);
Where IDR_TOOLBAR_SMALL is resource for bitmap, IDR_MAINFRAME is resource for toolbar with buttons. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
swautier ![]() Newbie ![]() Joined: 05 November 2007 Location: Belgium Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Great! Problem solved.
For the archive: People, please make sure that your toolbar image lists contain the same amount of images than defined buttons. I just spent one hour scratching my head wondering why the buttons were incorrectly drawn/resized in the menu items.
It appears that my image list had 5 unused images at the end. It never was a problem so far (old XT version) but XTP 11.20 seems to support non rectangular imagees and guesses button size based on the amount of buttons defined in the toolbar.
Maybe it was only very bad luck for me since I had 21 images and 16 buttons. Bad luck since buttons are 16x16. So XTP figured I had 16 buttons sized 21x16 instead of 21 16x16 images :-(
Also, XTP11 makes a great job at computing grayed images. Actually, I discovered that the result is better than the separate gray images I was using so far.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
:)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |