如何修改GUICtrlCreateListView文本?(已解决)
本帖最后由 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 本帖最后由 yejier1983 于 2010-6-3 20:18 编辑
帮你顶一下,gui不熟。 GUICtrlSetData($ListView1,"ID|Iteml")
好像可以.
然后你再看是用什么方式,输入要改为什么
GUICtrlGetState($listview)可以知道是点的那个. $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 GUICtrlSetData($ListView1,"ID|Iteml")
好像可以.
然后你再看是用什么方式,输入要改为什么
GUICtrlGetS ...
zhu1496193 发表于 2010-6-3 20:26 http://www.autoitx.com/images/common/back.gif
缘来是这样!
页:
[1]