Adding 16x16 and 24x24 icons |
Post Reply |
Author | |
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
I understood and suggested load 2 files to same Id - ImageMaanger allow such trick. Just try :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Have to work. You do something wrong. Please attach sample project.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
nighthawk
Senior Member Joined: 11 June 2004 Status: Offline Points: 167 |
Post Options
Thanks(0)
|
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.
|
|
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 |