Print Page | Close Window

Adding 16x16 and 24x24 icons

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Shortcut Bar
Forum Description: Topics Related to Codejock Shortcut Bar
URL: http://forum.codejock.com/forum_posts.asp?TID=11746
Printed Date: 21 November 2024 at 8:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding 16x16 and 24x24 icons
Posted By: nighthawk
Subject: Adding 16x16 and 24x24 icons
Date Posted: 06 August 2008 at 11:17am
I have all of my icons (both 16x16 and 24x24) stored in a single ImageManager object.  The problem is that the the same icon will have two seperate ids (one id for each size).  The ShortcutBarItem object only allows for one id to be set.  How do I get the ImageManager to have the same id for both icon sizes? 

I had it working by loading the icons into two different ImageLists but I want to use the CodeJock ImageManager control instead of the Microsoft ImageList control. 

Can anyone help me out with this?



Replies:
Posted By: Oleg
Date Posted: 07 August 2008 at 2:11am
Hi,
You have copy icons to use same Ids.  Its wrong logic to have different ids for same icons.


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


Posted By: nighthawk
Date Posted: 07 August 2008 at 2:01pm
I guess I wasn't clear.  I have the same icon in two seperate sizes.  Each size is in their own icon file.  So I have an image that is 16x16 in one file and a 24x24 version of the same image in a second file.  Both of these files are loaded into an ImageManager object and since they are two different files, they have two different ids.  The ShortcutBarItem only accepts one icon id so I can pick one of the sizes to use even though the ShortcutBarItem needs to be able to display two different sizes.

If I let the ShortcutBar resize the icons as needed, it looks really bad.  I tried using an .ico file that has both the 16x16 and 24x24 icons in a single file but the ShortcutBar will only find the larger icon and ignores the smaller icon.


Posted By: Oleg
Date Posted: 08 August 2008 at 6:43am
Hi,
 
I understood and suggested load 2 files to same Id - ImageMaanger allow such trick. Just try :)


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


Posted By: nighthawk
Date Posted: 08 August 2008 at 8:30am
I did as you suggested.  I am able to add both sizes as a single icon id but the ShortcutBar appears to ignore the 24x24 size.  When it needs to display the larger icon size, it resizes the 16x16 icon and it doesn't look very good.


Posted By: Oleg
Date Posted: 08 August 2008 at 1:02pm
Hi,
 
Have to work. You do something wrong. Please attach sample project.


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


Posted By: nighthawk
Date Posted: 09 August 2008 at 4:31am
I was putting together a sample project and I think I found the problem.  I was loading the icons into the ImageManager directly from a resource file and this wasn't working.  However, when I load in the icons directly from a file, it does work.  So I modified the program to put the icons in a temporary file and it looks everything works now.  Thanks for your help.



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