函数参考


GUICtrlSetDefColor

设置 GUI 窗口中所有控件文本默认颜色.

GUICtrlSetDefColor ( 默认文本颜色 [, 窗口句柄] )

参数

默认文本颜色 所有控件使用的默认文本颜色.
winhandle [可选参数] 由 GUICreate 返回的窗口句柄.(默认为先前使用的窗口).

返回值

成功: 返回 1.
失败: 返回 0.

注意/说明

None

相关

GUICreate, GUICtrlSetDefBkColor, GUICtrlSetColor

示例/演示


#include <GUIConstantsEx.au3>

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