找回密码
 加入
搜索
查看: 1985|回复: 4

[GUI管理] 如何修改GUICtrlCreateListView文本?(已解决)

  [复制链接]
发表于 2010-6-3 19:29:35 | 显示全部楼层 |阅读模式
本帖最后由 jinhao 于 2010-6-3 21:22 编辑
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 284, 214, -1, -1)
$ListView1 = GUICtrlCreateListView("ID|Item", 16, 8, 250, 150)
$Button1 = GUICtrlCreateButton("Button1", 32, 176, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 152, 176, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        MsgBox(0,'','如何把文本Item修改为Item1?')
                                                GUICtrlSetData($ListView1,"|Item1")
                Case $Button2
                        Exit
        EndSwitch
WEnd
发表于 2010-6-3 20:16:03 | 显示全部楼层
本帖最后由 yejier1983 于 2010-6-3 20:18 编辑

帮你顶一下,gui不熟。
发表于 2010-6-3 20:26:43 | 显示全部楼层
GUICtrlSetData($ListView1,"ID|Iteml")
好像可以.
然后你再看是用什么方式,输入要改为什么
GUICtrlGetState($listview)  可以知道是点的那个.
发表于 2010-6-3 20:35:53 | 显示全部楼层
$Form1 = GUICreate("Form1", 284, 214, -1, -1)
$ListView1 = GUICtrlCreateListView("你看|这样更改了没有?", 16, 8, 250, 150)
$Button1 = GUICtrlCreateButton("Button1", 32, 176, 75, 25, 0)
$Button2 = GUICtrlCreateButton("Button2", 152, 176, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case -3
                        Exit
                Case $Button1
                        MsgBox(0,'','Is that ok?')
                Case $Button2
                        Exit
        EndSwitch
WEnd
 楼主| 发表于 2010-6-3 21:19:57 | 显示全部楼层
GUICtrlSetData($ListView1,"ID|Iteml")
好像可以.
然后你再看是用什么方式,输入要改为什么
GUICtrlGetS ...
zhu1496193 发表于 2010-6-3 20:26


缘来是这样!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-11 18:50 , Processed in 0.082291 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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