Thunder-man Posted September 19, 2007 Posted September 19, 2007 (edited) Easy Function Sets the background and text color of a control. (In one line) We can also have "Transparent Label" Example: 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 GUICtrlSetBkColor($GuiID_, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor($GuiID_, $Textcolor_) Else GUICtrlSetBkColor($GuiID_, $BackColor_) GUICtrlSetColor($GuiID_, $Textcolor_) EndIf EndFunc ;==>_BKColor ;=========================================================================== So long Frank Edited September 19, 2007 by Thunder-man
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