Dave Towert
Posts: 16
Joined: 2007-11-29
|
I'm using ADX 2007 for .NET, Office 2003, Windows XP, VS 2005 and .net 2
I'm trying to add a custom icon to my ADXCommandBarButton in Outlook Explorer. The 16x16 32bit PNG icons show but the background color is not transparent as I need it to be. It shows as blue and I don't know where that is coming from.
I've tried with two icons, one with a red background and then set the ImageTransparentColor to red at runtime (this background shows as red on the command bar). I also tried a PNG graphic with a transparent background and set the ImageTransparentColor to transparent but it shows as blue.
The imagelist control hosting the icons has the transparent color set to Transparent but it didn't matter if I changed it to red.
Thanks for your help... |
|
Dave Towert
Posts: 16
Joined: 2007-11-29
|
After playing around for while, I noticed that my few white pixels in the image became transparent even though I set other colors to be transparent and also saved PNG with transparent backgrounds (which showed up as blue).
There must be a bug here but my workaround for now is to save the image with a white background and use 'near' white pixels when I need white in the image. Then at runtime I don't set the ImageTransparentColor property (I assume the default is White?), and it works. |
|
Sergey Grischenko
Add-in Express team
Posts: 7233
Joined: 2004-07-05
|
Hi Dave.
You just need to do the following:
1. Remove all icons from the ImageList (they were already corrupted since you had changed the TransparentColor of the ImageList at the design-time).
2. Set the TransparentColor of the ImageList to Transparent.
3. Add all icons to the ImageList again.
4. Add all icons to the buttons and set the ImageTransparentColor property of the buttons to the transparent color (at the design-time).
5. Rebuild the project.
|
|