PreludeOfDeath Posted November 5, 2007 Share Posted November 5, 2007 I want to Create a Button... With NO text on it... But, then I want to display a picture and a bunch of text on top of it... The Reason: So that when someone clicks on the text, or the picture, or anything within that button, it selects the same thing. Do I have to set up a separate 'on click' for all of the objects or can I just make the button be pressed every time? My Problem: The Button wants to be on TOP... Always! And if it isnt on top, and i move my mouse over it, it goes on top... how do i stop this? Plz Help! thanks! Link to comment Share on other sites More sharing options...
Valuater Posted November 5, 2007 Share Posted November 5, 2007 Dont use a button at all! $pic = createpic() $label = createlabel() while 1 $msg = get message() If $msg = $pic or $msg = $label then ;Do this 8) Link to comment Share on other sites More sharing options...
ofLight Posted November 5, 2007 Share Posted November 5, 2007 (edited) This is the method I use because I need to be able to Grab Focus on and Tab through all my buttons. $Button = GUICtrlCreateButton ("", 736, 224, 131, 25,$BS_BITMAP) GUICtrlSetImage ($Button, ".\test.bmp") Edited November 5, 2007 by ofLight There is always a butthead in the crowd, no matter how hard one tries to keep them out.......Volly Link to comment Share on other sites More sharing options...
martin Posted November 5, 2007 Share Posted November 5, 2007 (edited) The Button wants to be on TOP... Always! And if it isnt on top, and i move my mouse over it, it goes on top... how do i stop this? Try this. Press the button and the icon appears in the button, press it again and the text appears over the icon in the button. expandcollapse popup#include <guiconstants.au3> $g = GUICreate("") $i = GUICtrlCreateIcon("shell32.dll",22,15,15,16,16) GUICtrlSetState(-1,$GUI_HIDE) $l = GUICtrlCreateLabel('abcdef',15,15,20,18);,$WS_CLIPSIBLINGS) GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) GUICtrlSetState(-1,$GUI_HIDE) $b = guictrlcreatebutton("",10,10,40,40,$WS_CLIPSIBLINGS) GUISetState() $n = 0 While 1 $m = GUIGetMsg() Switch $m Case $GUI_EVENT_CLOSE Exit Case $b,$i,$l If $n = 0 Then ConsoleWrite("step 1") GUICtrlSetState($i,$GUI_SHOW) $n += 1 ElseIf $n = 1 Then ConsoleWrite(", step 2") GUICtrlSetState($l,$GUI_SHOW) $n += 2 Else MsgBox(0,'error','Nothing left To Do') EndIf EndSwitch WEnd Edited November 5, 2007 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
toothyXdip Posted November 5, 2007 Share Posted November 5, 2007 (edited) you could just use his method and just put text in as the pic...This is the method I use because I need to be able to Grab Focus on and Tab through all my buttons.CODE: AutoIt$Button = GUICtrlCreateButton ("", 736, 224, 131, 25,$BS_BITMAP)GUICtrlSetImage ($Button, ".\test.bmp") Edited November 5, 2007 by toothyXdip ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
PreludeOfDeath Posted November 6, 2007 Author Share Posted November 6, 2007 Thank You Everyone for your Fast and Helpful replies! I am at work right now, but when I get home I will be trying these all out to see what works best! Thank You Again!!! Link to comment Share on other sites More sharing options...
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