Jump to content

Recommended Posts

Posted

hi does any body know how to put images on buttons? i am making back and forward buttons for the browser im working on and i want to put arrows images on the buttons. any ideaS???

[quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote]

Posted

I believe I asked this a while back but forgot, someone pointed out it's CLEARLY stated in the help file or search the forum. Also this is a GUI issue not really support. Sorry that I can't help but I forgot. :)

AutoIt Smith

Posted

have a look in the help for:

GUICtrlSetImage

<{POST_SNAPBACK}>

Yep, just need to RTM.

#include <GUIConstants.au3>

GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered

$Btn1 = GUICtrlCreateButton ("Yes", 10,20,40,40, $BS_ICON)
$Btn2 = GUICtrlCreateButton ("No", 60,20,40,40, $BS_ICON)
GUICtrlSetImage ($Btn1, "shell32.dll",22)
GUICtrlSetImage ($Btn2, "shell32.dll",22)

GUISetState ()    ; will display an  dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

This example is an icon, but you can use other formats also. I'll leave that for you to look up.

Kerby

Posted

Yea, you can also specify it to be a bitmap picture... But then again that's clearly stated in the help file, I'm sure you can figure that toughy out...

RTFM

FootbaG
Posted

well prog solved thanx guys

[quote]Randy:This is for what?! Arresting me for what?! I'm not allowed to stand up for myself?! I thought this was America! Huh? Isn't this America?! I'm sorry! I thought this was America![/quote]

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
×
×
  • Create New...