Jump to content
Sign in to follow this  

Function _BKColor

Recommended Posts


Easy Function :)

Sets the background and text color of a control. (In one line)

We can also have "Transparent Label"


Transparent Label with blue text

$MyLabel = GUICtrlCreateLabel("V 1.20", 205, 114, 35, 17)

_BKColor(-1, -1, 0x0000FF)

; Function    : _BKColor( backgroundcolor, controlID, textcolor )
; Description   : Sets the background color of a control. (Transparent Label)
;              : Sets the text color of a control.
; Author        : Thunder-man (Frank Michalski)
; Date        : 19. September 2007
; Version      : V 1.20
; Example  :     _BKColor()                             :Transparent
;               _BKColor( -1, $MyLabel)                :Transparent
;               _BKColor(0x00ff00)                      :Color Green
;               _BKColor(0x00ff00, $MyLabel)              :Color Green
;               _BKColor( -1, $MyLabel, 0x00ff00)   :Text Color Green
Func _BKColor($BackColor_ = "", $GuiID_ = -1, $Textcolor_ = 0x000000)
    If $BackColor_ = "" or $BackColor_ = -1 Then
    GUICtrlSetColor($GuiID_, $Textcolor_)
    GUICtrlSetBkColor($GuiID_, $BackColor_)
    GUICtrlSetColor($GuiID_, $Textcolor_)
EndFunc ;==>_BKColor

So long


Edited by Thunder-man

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.