Icon Transparency in AdvSmoothButton

Hi there

I would like to make a square button with an icon above the text.
I started with AdvSmoothButton and was able to add an image series through the ImageList object.

The problem is that I can't get the space around the icon to display as transparent. Can anyone give me some pointers on how to achieve this? (I have tried using files with a transparent Alpha Channel such as PNG and GIF and also the method where you give the icon a specific bg colour that you then assign to transparency using the image list editor.
(Example here: http://www.true.co.za/TMS/1.JPG


It seems that you are not using a correct PNG image. I suggest you use an image editing software to remove the background and replace it with a transparent background and save the image as a PNG. Paint.Net is a good tool to achieve this.

Kind Regards, 
Scheldeman Pieter

Hi Pieter, thanks for the reply.

It seems the png transparency works fine when applied to the button via the object inspector as a "picture".
The problem occurs when adding images to the button via the ImageList object and editor. 
I think it must be a setting relating to how the ImageList image is applied to the button? 

The button internally assigns the image bitmap to a TAdvGDIPPicture for drawing. the TAdvGDIPPicture creates a transparent image if the bitmap contains transparency data such as the color / alpha channel. This is no real png image approach as the imagelist only returns bitmaps even though you have added a PNG. I suggest you use a TGDIPPictureContainer as this also supports multiple image formats including PNG files and the GDIPPictureContainer directly uses the PNG data for drawing.

Kind Regards, 

Pieter Scheldeman2013-03-19 12:02:28

Please excuse my ignorance, but how do you assign a TGDIPPIctureContainer to a button's image? 


Under Appearance, You can assign the picturecontainer and set the picturecontainername to the name of the item you
have added to the picturecontainer.

Kind Regards, 

Thank you.  I see the property now.  I noticed there is nothing similar for the AdvGlowButon nor the DBadvGlowButton.  How would I accomplish the same thing?