找回密码
 加入
搜索
查看: 2916|回复: 7

[GUI管理] 这个变量该怎么写,各位大哥帮忙

  [复制链接]
发表于 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
发表于 2011-9-29 01:04:59 | 显示全部楼层
没看明白什么意思!
 楼主| 发表于 2011-9-29 01:07:38 | 显示全部楼层
看一下注释那两个地方啊  大哥
发表于 2011-9-29 04:53:39 | 显示全部楼层
还是不明白,另外把代码结构整理下(缩进)
发表于 2011-9-30 11:58:11 | 显示全部楼层

$ViewItem[$i] = GUICtrlCreateListViewItem(FileReadLine("文本.txt", $i), $ListView)
发表于 2011-9-30 11:58:33 | 显示全部楼层
记得先声明数组变量
发表于 2011-9-30 19:53:31 | 显示全部楼层
五楼正解
发表于 2011-10-1 00:08:42 | 显示全部楼层
不太明白楼主意思 应该是5楼说的吧~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-9 03:36 , Processed in 0.083428 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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