Sets the background color of a control.
GUICtrlSetBkColor ( controlID, backgroundcolor )
Parameters
controlID | The control identifier (controlID) as returned by a GUICtrlCreate... function. |
backgroundcolor | The RGB color to use. |
Return Value
Success: | Returns 1. |
Failure: | Returns 0. |
Remarks
Only Label, Checkox, Group, Radio, Edit, Input, List, Listview, ListviewItem, Treeview, TreeviewItem, Graphic and Progress controls can currently be colored.
Related
ColorMode (Option), GUICtrlCreate..., GUICtrlSetColor
Example
#include <GUIConstants.au3>
GUICreate("My GUI background color") ; will create a dialog box that when displayed is centered
GUICtrlCreateLabel ("my label", 10,20)
GUICtrlSetBkColor(-1,0x00ff00) ; Green
GUISetState ()
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend