Sign in to follow this  
Followers 0
lm1

Scripting fonts

7 posts in this topic

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.

Posted Image

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?

Share this post


Link to post
Share on other sites



Search the helpfile for GUICtrlSetBkColor with the color being $GUI_BK_TRANSPARENT

Share this post


Link to post
Share on other sites

Can you please put the image in a link? it took me almost 30 seconds to download it

Share this post


Link to post
Share on other sites

Search the helpfile for GUICtrlSetBkColor with the color being $GUI_BK_TRANSPARENT

I 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

Share this post


Link to post
Share on other sites

Anybody have any ideas on this?

Share this post


Link to post
Share on other sites

Post some code.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 :whistle:

I changed Smoke'N's code around a little but here it is:

#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
EndFunc

Original Post: http://www.autoitscript.com/forum/index.ph...=Checkbox+Color

Edited by CHRIS95219

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