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

[GUI管理] 请教。怎么单选后让一部分输入框变灰色?《已经解决》

[复制链接]
发表于 2010-4-27 02:00:24 | 显示全部楼层 |阅读模式
本帖最后由 lsq726 于 2010-4-27 02:51 编辑
#include <GUIConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\桌面\test.kxf
$Form1_1 = GUICreate("test", 501, 353, 189, 116)
$Button1 = GUICtrlCreateButton("18", 408, 80, 75, 25)
$Button2 = GUICtrlCreateButton("16", 408, 16, 75, 25)
$Button3 = GUICtrlCreateButton("19", 408, 112, 75, 25)
$Label1 = GUICtrlCreateLabel("1", 40, 24, 10, 17)
$Label2 = GUICtrlCreateLabel("2", 40, 48, 10, 17)
$Label3 = GUICtrlCreateLabel("3", 40, 72, 10, 17)
$Input1 = GUICtrlCreateInput("9", 128, 24, 121, 21)
$Input2 = GUICtrlCreateInput("10", 128, 48, 121, 21)
$Input3 = GUICtrlCreateInput("11", 128, 72, 121, 21)
$Label5 = GUICtrlCreateLabel("6", 40, 144, 10, 17)
$Label6 = GUICtrlCreateLabel("7", 40, 176, 10, 17)
$Input6 = GUICtrlCreateInput("12", 128, 144, 121, 21)
$Input5 = GUICtrlCreateInput("13", 128, 168, 121, 21)
$Input7 = GUICtrlCreateInput("14", 128, 192, 121, 21)
$Label8 = GUICtrlCreateLabel("8", 40, 200, 10, 17)
$Button5 = GUICtrlCreateButton("17", 408, 48, 75, 25)
$Checkbox1 = GUICtrlCreateCheckbox("15", 296, 120, 97, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio1 = GUICtrlCreateRadio("4", 40, 112, 65, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Radio2 = GUICtrlCreateRadio("5", 128, 112, 73, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

                Case $Form1_1
                Case $Form1_1
                Case $Form1_1
                Case $Form1_1
                Case $Button1
                        MsgBox(0, "", $Button1)
                Case $Button2
                        MsgBox(0, "", $Button2)
                Case $Button3
                        Exit
                Case $Label1
                Case $Label2
                Case $Label3
                Case $Input1
                Case $Input2
                Case $Input3
                Case $Label5
                Case $Label6
                Case $Input6
                Case $Input5
                Case $Input7
                Case $Label8
                Case $Button5
                        MsgBox(0, "", GUICtrlRead($Input1))
                Case $Checkbox1
                Case $Radio1
                Case $Radio2
                                                
        EndSwitch
WEnd
怎么修改可以实现 选4的时候 6 7 8是可用的
而选5的时候12 13 14变成灰色的?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

 楼主| 发表于 2010-4-27 02:50:37 | 显示全部楼层
谢谢无所谓的蛋蛋。
                Case $Radio1
                        GUICtrlSetState($Input6, $gui_enable)
                        GUICtrlSetState($Input7, $gui_enable)
                        GUICtrlSetState($Input5, $gui_enable)
                Case $Radio2
                        GUICtrlSetState($Input6, $gui_disable)
                        GUICtrlSetState($Input7, $gui_disable)
                        GUICtrlSetState($Input5, $gui_disable)
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-11 17:06 , Processed in 0.085350 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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