找回密码
 加入
搜索
查看: 1965|回复: 5

[AU3基础] 修改Button的caption

  [复制链接]
发表于 2010-7-18 18:33:57 | 显示全部楼层 |阅读模式
我想点击一下按钮,就更改按钮上面的文字
发表于 2010-7-18 19:26:25 | 显示全部楼层
我也想知道怎么弄```
发表于 2010-7-18 19:46:53 | 显示全部楼层
Dim $i=0
$Form1 = GUICreate("Form1", 333, 174, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 80, 56, 169, 49)
GUISetState(@SW_SHOW)

While 1
        If GUIGetMsg()=-3 Then Exit
        If GUIGetMsg()=$Button1 Then
                $i=$i+1
                GUICtrlSetData($Button1,"你已经点了我"&$i&"下了")
        EndIf
WEnd

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

发表于 2010-7-18 19:48:26 | 显示全部楼层
GUICreate('')
$b = GUICtrlCreateButton('A', 100, 100, 150, 25)
GUISetState()
While 1
        $msg = GUIGetMsg()
        Switch $msg
                Case -3
                        Exit
                Case $b
                        If GuiCtrlRead($msg) = 'A' Then
                                GuiCtrlSetData($msg, 'B')
                        Else
                                GuiCtrlSetData($msg, 'A')
                        Endif
        EndSwitch
WEnd
发表于 2010-7-18 23:23:16 | 显示全部楼层
用_GUICtrlButton_Create做
发表于 2010-7-19 10:58:35 | 显示全部楼层
GuiCtrlSetData就ok
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-22 01:24 , Processed in 0.077710 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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