GarrettHylltun Posted June 20, 2006 Posted June 20, 2006 Greetings, How do I get both the text and an icon on a button? $button1 = GUICtrlCreateButton ("Test", 0,0,100,100,$BS_TOP + $BS_ICON) GUICtrlSetImage (-1, "C:\Games\Archery.exe",0) Thanks, -Garrett
BigDod Posted June 20, 2006 Posted June 20, 2006 You could always create an icon with both text and image in it. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Root_2006 Posted June 21, 2006 Posted June 21, 2006 BigDod said: You could always create an icon with both text and image in it.How can I do?I'm using AutiIt V3.
syberschmo Posted June 21, 2006 Posted June 21, 2006 (edited) I think it would be easier to create a bitmap with an icon and text on it. Use the $BS_BITMAP style instead of the $BS_ICON style that's in your example. You can always use MS Paint for the bitmap and extract the icon from archery.exe using an icon browsing program (search the forums). edit: beta is not needed Edited June 21, 2006 by syberschmo Gradient-Filled Progress Bars UDF
ConsultingJoe Posted October 22, 2007 Posted October 22, 2007 Is this still not possiable? I know it is in C++: http://www.codeguru.com/cpp/controls/butto...icle.php/c2057/Thanks Check out ConsultingJoe.com
Valuater Posted October 22, 2007 Posted October 22, 2007 Autoit Wrappers is your friend; Icon on Button - (made easy) ; Author - Valuater #include <GUIConstants.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 EndFunc8)
ConsultingJoe Posted October 22, 2007 Posted October 22, 2007 Thank you soo much Check out ConsultingJoe.com
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now