Jump to content
TheDcoder

Button not displaying image for some reason

Recommended Posts

TheDcoder

Hello, I am trying to figure out what is the problem but I am can't seem to find it :(, Here is the GUI:

Local $hGUI = GUICreate("Magic Number Calculator", 528, 287)
GUISetBkColor(0xFFFFFF, $hGUI)
GUICtrlCreateGroup("Control Panel", 7, 2, 514, 110)
GUICtrlCreateLabel("Function:", 14, 21, 98, 15)
GUICtrlCreateLabel("Corrected Function:", 14, 44, 98, 15)
GUICtrlCreateLabel("Status:", 14, 67, 50, 15)
Local $idFunctionInput = GUICtrlCreateInput("", 113, 16, 325, 20)
Local $idCorrectedFunctionInput = GUICtrlCreateInput("", 113, 38, 325, 20, $ES_READONLY)
Local $idPasteButton = GUICtrlCreateButton("Paste", 442, 15, 74, 22, $BS_BITMAP)
Local $idCopyButton = GUICtrlCreateButton("Copy", 442, 37, 74, 22, $BS_BITMAP)
Local $idHelpAndAboutButton = GUICtrlCreateButton("Help && About", 442, 60, 74, 22, $BS_BITMAP)
Global $idStatusBar = GUICtrlCreateLabel("Idle", 113, 61, 325, 20, $SS_CENTER)
Local $idCalculateButton = GUICtrlCreateButton("Calculate!", 221, 83, 100, 26, $BS_BITMAP)
Local $idStyleList = GUICtrlCreateListView("Style|Value", 7, 117, 253, 164)
Local $idExStyleList = GUICtrlCreateListView("Ex-Style|Value", 268, 117, 253, 164)
GUICtrlSetImage($idPasteButton, @ScriptDir & '\Media\Icons\page_copy.png')
GUICtrlSetImage($idCopyButton, @ScriptDir & '\Media\Icons\page.png')
GUICtrlSetImage($idCalculateButton, @ScriptDir & '\Media\Icons\calculator.png')
GUISetState()

Icons: page.thumb.png.0b8d81fe40f1b7a049a35bb9dpage_copy.thumb.png.644a454f0037145c7154calculator.thumb.png.9868626e257ac2bee4a

Thanks in advance, TD :)

Edited by TheDcoder

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) mean to do that to anybody!!!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
LarsJ

PNG images are not directly supported by GUICtrlSetImage. But it's possible to use PNG images with GDIPlus. Search helpfile and forum for examples.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×