PNG on buttons

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

PNG on buttons

#1 Post by skiman »

Hi,

Is there a way to use PNG images on buttons instead of BMP files? With the use of the transparancy?
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: PNG on buttons

#2 Post by rdonnay »

Code: Select all

#INCLUDE "dcdialog.ch"

FUNCTION Main()

LOCAL GetList[0], oBitmap

oBitmap := DC_GetBitmap('MokoSanta.Png')
oBitmap:transparentClr := GRA_CLR_WHITE

@ 0,0 DCPUSHBUTTONXP CAPTION oBitmap SIZE 500,500 PIXEL ;
      COLOR GRA_CLR_DARKPINK GRADIENT .3

DCREAD GUI FIT TITLE 'Transparent Button'

RETURN nil

* -------

PROC appsys ; return
MokoSanta.png
MokoSanta.png (344.58 KiB) Viewed 5179 times
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: PNG on buttons

#3 Post by skiman »

Hi Roger,

Thanks for the sample.

Would it be possible to add the PNG to a DLL and to use it that way?

Otherwise I'm thinking about creating a font with my icons.
Best regards,

Chris.
www.aboservice.be

Post Reply