诺言 发表于 2011-9-29 00:37:59

这个变量该怎么写,各位大哥帮忙

本帖最后由 诺言 于 2011-9-29 00:41 编辑

#Include <File.au3>
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
$Form = GUICreate("", 500, 220, @DesktopWidth/2-250, 0, 0x90800000, 0x00000008)
$Button = GUICtrlCreateButton("关闭", 0, 0, 500, 20)
GUICtrlSetColor(-1, 0x0000FF)
$ListView=GUICtrlCreateListView("标题|内容",0,20,500,200,0x4000,0x00000031)
_GUICtrlListView_SetColumnWidth($ListView,0,200)
_GUICtrlListView_SetColumnWidth($ListView,1,260)
GUICtrlCreateListViewItem("标题|内容",$ListView)
For $i=1 To _FileCountLines("文本.txt")
$ViewItem=GUICtrlCreateListViewItem(FileReadLine("文本.txt",$i),$ListView);这个变量应该怎么写
Next
While 1
$GUI = GUIGetMsg()
Select
Case $GUI = $GUI_EVENT_CLOSE Or $GUI = $Button
ExitLoop
Case $GUI = $ViewItem;这里该怎么选择
MsgBox(0,0,0)
EndSelect
WEnd

gzh888666 发表于 2011-9-29 01:04:59

没看明白什么意思!

诺言 发表于 2011-9-29 01:07:38

看一下注释那两个地方啊大哥

netegg 发表于 2011-9-29 04:53:39

还是不明白,另外把代码结构整理下(缩进)

cxlater 发表于 2011-9-30 11:58:11


$ViewItem[$i] = GUICtrlCreateListViewItem(FileReadLine("文本.txt", $i), $ListView)

cxlater 发表于 2011-9-30 11:58:33

记得先声明数组变量

xms77 发表于 2011-9-30 19:53:31

五楼正解{:face (52):}

zcool321 发表于 2011-10-1 00:08:42

不太明白楼主意思 应该是5楼说的吧~
页: [1]
查看完整版本: 这个变量该怎么写,各位大哥帮忙