cheese Posted September 26, 2008 Posted September 26, 2008 Hi, how remove background color from disable lable? $fill = 0 ;=== GUI create === GUICreate("Set/Remove GUICtrlSetBkColor",270,50) $btn = GUICtrlCreateButton("Set BkColor",10,10,120,30) $lbl = GUICtrlCreateInput("",140,10,120,30) GUICtrlSetState(-1,128) ;128 = $GUI_DISABLE ;=== GUI start === GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 ;-3 = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn If $fill = 0 Then GUICtrlSetBkColor($lbl,0xFF0000) GUICtrlSetData($btn,"Remove BkColor") $fill = 1 MsgBox(0,"","BkColor set to 0xFF0000") Else ;>>>>> <<<<< ;>>>>> ??? No BkColor ??? <<<<< ;>>>>> <<<<< GUICtrlSetData($btn,"Set BkColor") $fill = 0 MsgBox(0,"","How remove BkColor?") EndIf EndSelect WEnd ;=== GUI stop === GUIDelete()
rover Posted September 26, 2008 Posted September 26, 2008 Hi, how remove background color from disable lable? expandcollapse popup$fill = 0 ;=== GUI create === GUICreate("Set/Remove GUICtrlSetBkColor",270,50) $btn = GUICtrlCreateButton("Set BkColor",10,10,120,30) $lbl = GUICtrlCreateInput("",140,10,120,30) GUICtrlSetState(-1,128) ;128 = $GUI_DISABLE ;=== GUI start === GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 ;-3 = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn If $fill = 0 Then GUICtrlSetBkColor($lbl,0xFF0000) GUICtrlSetData($btn,"Remove BkColor") $fill = 1 MsgBox(0,"","BkColor set to 0xFF0000") Else ;>>>>> <<<<< ;>>>>> ??? No BkColor ??? <<<<< ;>>>>> <<<<< GUICtrlSetData($btn,"Set BkColor") $fill = 0 MsgBox(0,"","How remove BkColor?") EndIf EndSelect WEnd ;=== GUI stop === GUIDelete()oÝ÷ Ûú®¢×ç¬yg¥r¶ayú+ºk*.Á©í¶Þ²Ú+zØ^uçÚº[`ìiÉ ®§vØ^ë¢w¨~Ø^B¶¹RzÐd h®X§zÂ-®'ëmxp g@¨ÚÕ¢ÈIëA*%¢ºÞ¶êç²Þ¾*.±Ê%¢êí£ +e Úå ·µâ'¦ëM 2jëh×6$fill = 0 ;=== GUI create === GUICreate("Set/Remove GUICtrlSetBkColor",270,50) GUISetBkColor(0xFFFFFF) $btn = GUICtrlCreateButton("Set BkColor",10,10,120,30) $lbl = GUICtrlCreateInput("",140,10,120,30) GUICtrlSetState(-1,128) ;128 = $GUI_DISABLE ;=== GUI start === GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 ;-3 = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn If $fill = 0 Then GUICtrlSetBkColor($lbl,0xFF0000) GUICtrlSetData($btn,"Remove BkColor") $fill = 1 MsgBox(0,"","BkColor set to 0xFF0000") Else GUICtrlSetBkColor($lbl, $CLR_NONE) ; set to default gui color grey ;GUICtrlSetBkColor($lbl, -1) ; set to default gui color grey ;GUICtrlSetBkColor($lbl, 0xFFFFFFFF) ; set to default gui color grey GUICtrlSetData($btn,"Set BkColor") $fill = 0 EndIf EndSelect WEnd ;=== GUI stop === GUIDelete() I see fascists...
martin Posted September 26, 2008 Posted September 26, 2008 Why not use GUICtrlSetBkColor($lbl,$GUI_BKCOLOR_TRANSPARENT ) ? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
cheese Posted September 28, 2008 Author Posted September 28, 2008 Thanks you so much! -1 = 0xFFFFFFFF = $GUI_BKCOLOR_DEFAULT = $CLR_NONE -2 = 0xFFFFFFFE = $GUI_BKCOLOR_TRANSPARENT
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