TheDcoder

Button not displaying image for some reason

4 posts in this topic

#1 ·  Posted (edited)

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

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

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

Share this post


Link to post
Share on other sites



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

@LarsJ Oh, thanks!


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

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

guisetstate()

You need that to show your window

Edited by Xandy

I am not a lawyer.  (-_-) Xandy About  (^o^) Discord - Xandy Programmer

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