找回密码
 加入
搜索
查看: 3740|回复: 1

[GUI管理] checkbox复选框的文字颜色怎么设置[已解决]

[复制链接]
发表于 2012-8-19 13:51:01 | 显示全部楼层 |阅读模式
本帖最后由 1007236046 于 2012-8-19 16:38 编辑

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 432, 192, 124)
$Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 216, 112, 137, 41)
$Button1 = GUICtrlCreateButton("变色", 200, 216, 73, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        GUICtrlSetColor($Checkbox1,0xFF0000)
        EndSwitch
WEnd

button按钮可以改变文字颜色,checkbox又不行了
发表于 2012-8-19 14:16:35 | 显示全部楼层
注意/说明

只有按钮(Button),标签(Label),检查框 (Checkbox),群组(Group), 单选按钮(Radio),文本编辑框(Edit), 输入框(Input),列表 (List),列表查看 (Listview), 列表查看项目(ListviewItem), 树形列表(Treeview), 树形列表项目(TreeviewItem),图形显示(Graphic), 进度条(Progress) 和 滑动条(Slider) 控件可以设置颜色.

若系统使用的主题是"Windows XP/Vista"那么进度条和检查框控件就不能应用此颜色设置.

按钮控件在"windows 经典" 的系统主题下,不能有 $BS_ICON 样式.

评分

参与人数 1金钱 +20 收起 理由
1007236046 + 20 谢谢提醒

查看全部评分

您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-30 03:34 , Processed in 0.073982 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表