lm1 Posted October 23, 2006 Posted October 23, 2006 I am currently designing a script for the addons with world of warcraft. And i cant seem to figure out if there is a command in autoit that i can use to make something along the lines of the background box of font (contrasting against a colorful background) invisible.? There should be a screen shot of what the addon screen currently looks like.As you can see the grey boxes behind the font kinda make the screen look icky. Is there a way to make the background to the font invisible?
NELyon Posted October 23, 2006 Posted October 23, 2006 Search the helpfile for GUICtrlSetBkColor with the color being $GUI_BK_TRANSPARENT
Paulie Posted October 23, 2006 Posted October 23, 2006 Can you please put the image in a link? it took me almost 30 seconds to download it
lm1 Posted October 23, 2006 Author Posted October 23, 2006 Search the helpfile for GUICtrlSetBkColor with the color being $GUI_BK_TRANSPARENTI did attempt to set this however my Autoit gives me an error, $GUI_BK_TRANSPARENT - undeclared global variable. If I declare this variablke myself, I don't know what hex value to assign it to work as transparent.I can change it to another colour, but what do I use for the $GUI_BK_TRANSPARENT?Thanks
Fossil Rock Posted November 3, 2006 Posted November 3, 2006 Post some code. Agreement is not necessary - thinking for one's self is!
cppman Posted November 3, 2006 Posted November 3, 2006 (edited) It is: $GUI_BKCOLOR_TRANSPARENT, and it does'nt work with checkboxes...You will have to create a seperate checkbox and label if you wish to have it transparent.. Smoke'N wrote a script I think to do it for you I changed Smoke'N's code around a little but here it is:expandcollapse popup#include <Guiconstants.au3> GUICreate("test") GUICtrlCreatePic(@WindowsDir & "\Greenstone.bmp", 0, 0, 300, 300) GUICtrlSetState(-1, $GUI_DISABLE) $test = _GUICtrlCreateCheckbox("Testing", 0, 0, 50, 25, $GUI_BKCOLOR_TRANSPARENT) GUISetState() While (GUIGetMSg() <> -3) WEnd Func _GUICtrlCreateCheckbox($sText, $nLeft, $nTop, $nWidth, $nHeight, $nColor) Local $aCkBoxEx[3] $aCkBoxEx[1] = GUICtrlCreateCheckbox('', $nLeft, $nTop, 13, 13) $aCkBoxEx[2] = GUICtrlCreateLabel($sText, $nLeft + 20, $nTop, $nWidth, $nHeight) GUICtrlSetBkColor($aCkBoxEx[2], $nColor) Return $aCkBoxEx EndFunc oÝ÷ Úf²mæzÛ^ìZ^jëh×6 #include <Guiconstants.au3> Global $show = 0 GUICreate("test") GUICtrlCreatePic(@WindowsDir & "\Greenstone.bmp", 0, 0, 300, 300) GUICtrlSetState(-1, $GUI_DISABLE) $test = _GUICtrlCreateCheckbox("Testing", 0, 0, 50, 25, $GUI_BKCOLOR_TRANSPARENT) GUISetState() While (GUIGetMSg() <> -3) $msg = GUIGetMsg() if ($msg == $test[2]) Then ToggleState($test[1]) EndIf if (GUICtrlRead($test[1]) == $GUI_CHECKED) Then ShowOnce() Else $show = 1 EndIf WEnd Func _GUICtrlCreateCheckbox($sText, $nLeft, $nTop, $nWidth, $nHeight, $nColor) Local $aCkBoxEx[3] $aCkBoxEx[1] = GUICtrlCreateCheckbox('', $nLeft, $nTop, 13, 13) $aCkBoxEx[2] = GUICtrlCreateLabel($sText, $nLeft + 20, $nTop, $nWidth, $nHeight) GUICtrlSetBkColor($aCkBoxEx[2], $nColor) Return $aCkBoxEx EndFunc Func ToggleState($control) if (GUICtrlRead($control) == $GUI_CHECKED) Then GUICtrlSetState($test[1], $GUI_UNCHECKED) Else GUICtrlSetState($test[1], $GUI_CHECKED) EndIf EndFunc Func ShowOnce() if ($show == 1) Then MsgBox(0, "", "YOu Clicked me!") EndIf $show = 0 EndFuncOriginal Post: http://www.autoitscript.com/forum/index.ph...=Checkbox+Color Edited November 3, 2006 by CHRIS95219 Miva OS Project
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