Sign in to follow this  
Followers 0
jercfd

how to make button with picture and text

3 posts in this topic

how do you make a button with text?

example

Posted Image

Share this post


Link to post
Share on other sites



This can give you an idea!

; Icon on Button - (made easy)
; Author - Valuater

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$mywin = GUICreate("my gui")
$btn1 = IconButton("Help", 30, 30, 70, 32, 23)
GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = $btn1 Then MsgBox(0,0,"You pressed the Icon Button  ", 2)
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd

Func IconButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = "shell32.dll")
    GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16)
    GUICtrlSetState( -1, $GUI_DISABLE)
    $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS)
    Return $XS_btnx
EndFunc

This and many other helpful script-lets are here to help you.... Autoit Wrappers

http://www.autoitscript.com/forum/index.ph...st&p=133769

.... and here is a link to "picture" buttons

http://www.autoitscript.com/forum/index.ph...st&p=288428

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thanks this will work for me. i thought it would be more complicated but its actually quite simple.

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  
Followers 0