Sign in to follow this  
Followers 0
cheese

How remove BkColor?

4 posts in this topic

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()

Share this post


Link to post
Share on other sites



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()oÝ÷ Ûú®¢×ç¬yg¥r¶ayú+ºk*.Á©í¶Þ²Ú+^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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thanks you so much! :)

-1 = 0xFFFFFFFF = $GUI_BKCOLOR_DEFAULT = $CLR_NONE

-2 = 0xFFFFFFFE = $GUI_BKCOLOR_TRANSPARENT

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