Function Reference

GUICtrlSetDefColor

Sets the default text color of all the controls of the GUI window.

GUICtrlSetDefColor ( deftextcolor [, winhandle] )

 

Parameters

deftextcolor Default text color for all controls.
winhandle [optional] Windows handle as returned by GUICreate (default is the previously used window).

 

Return Value

Success: Returns 1.
Failure: Returns 0.

 

Remarks

None

 

Related

GUICreate, GUICtrlSetDefBkColor, GUICtrlSetColor

 

Example


#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Example()

Func Example()
    Local $msg
   
    GUICreate("test GUISetTextColor", 100,100)  ; will create a dialog box that when displayed is centered

    GUICtrlSetDefColor(0xFF0000)  ; will change text color for all defined controls
   
    GUICtrlCreateLabel("label", 10,5)

    GUICtrlCreateRadio("radio", 10,25,50)
    GUICtrlSetColor(-1, 0x0000FF)  ; will change text color for specified control
   
    GUICtrlCreateButton("button", 10,55)
   
    GUISetState()       ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
       
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
EndFunc   ;==>Example