Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Transparent label

$
0
0
Hi. here's a working example on how to make transparent labels, what I need it for is making a checkbox transparent, but it only works with labels
maybe someone know why :)?

[ autoit ]         
#include #include #include #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 315, 211, 192, 124) $Pic1 = GUICtrlCreatePic("background.jpg", 0, 0, 313, 209) $Label1 = GUICtrlCreateLabel("Label1", 56, 176, 36, 17) _BKColor( -1, $Label1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Form1 Case $Form1 Case $Form1 Case $Form1 Case $Pic1 Case $Label1 EndSwitch WEnd ;=========================================================================== ; 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 ;=======================================================================

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>