Jump to content
Sign in to follow this  
trickytroy

Images on buttons?

Recommended Posts

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]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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]

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...