找回密码
 加入
搜索
查看: 5976|回复: 20

能否在ListView上加进度条??

 火.. [复制链接]
发表于 2009-7-23 22:52:47 | 显示全部楼层 |阅读模式
本帖最后由 天堂泪吻泪 于 2009-7-24 09:15 编辑

我试过这样还是不行!!!
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
$Form1 = GUICreate("列表框实例", 281, 272, 388, 274)
$Button1 = GUICtrlCreateButton("OK", 104, 208, 65, 33, 0)
$ListView1 = GUICtrlCreateListView("分区|容量|空闲情况          ", 16, 8, 250, 150)
;~ $item1 = GUICtrlCreateListViewItem("C:|20G|"& GUICtrlCreateProgress(-1, -1, 150, 17) , $listview1)
;~ GUICtrlSetData(-1, 50)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;$pro=GUICtrlCreateProgress(-1, -1, 150, 17)
;~ $item1 = GUICtrlCreateListViewItem("C:|20G|"& $pro, $listview1)
;~ GUICtrlSetData(-1, 50)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$item1 = GUICtrlCreateListViewItem("C:|20G|"& ProgressSet(50) , $listview1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        Exit
        EndSwitch
WEnd

不好意思!可能我写的有错误,我是想在列表框里面带进度条,也就是说我想在"空闲情况"下面带有进度条,也就是现在数值为"1"的地方!

感谢2楼,真的是谢谢了!
UDF函数的帖:http://www.autoitx.com/forum.php?mod=viewthread&tid=3028&extra=page%3D3

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-7-23 23:00:33 | 显示全部楼层
本帖最后由 afan 于 2009-7-24 01:37 编辑

找到那个UDF了~
#include 'ListView_Progress.au3'

$Form1 = GUICreate("列表框实例", 281, 272, 388, 274)
$Button1 = GUICtrlCreateButton("OK", 104, 208, 65, 33, 0)
$ListView1 = GUICtrlCreateListView("分区|容量|空闲情况", 16, 8, 250, 150)
_GUICtrlListView_SetColumnWidth(-1, 2, 130)
$item1 = GUICtrlCreateListViewItem("C:|20G|", $ListView1)
$1 = _ListView_InsertProgressBar($ListView1, 0, 2)
GUISetState()

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        _Progress_SetPos($1, 20)
        EndSwitch
WEnd

ok~ 具体的进度显示慢慢看UDF吧,呵呵~

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×

评分

参与人数 1金钱 +10 贡献 +20 收起 理由
lynfr8 + 10 + 20 原创内容,感谢你对论坛的支持;希望继续发 ...

查看全部评分

发表于 2009-7-23 23:30:40 | 显示全部楼层
本论坛有人发过相关的UDF
发表于 2009-7-24 10:43:08 | 显示全部楼层
学习一下。。。
发表于 2009-7-24 13:03:13 | 显示全部楼层
我2#贴的UDF是官网之后更新的,修复了一些BUG,增加了一些内容,看看吧
发表于 2009-7-27 21:55:46 | 显示全部楼层
这个udf不错,不过在某一行之上再插入一行,进度条能自动下移一行吗?(刷新?)
发表于 2009-8-7 00:34:26 | 显示全部楼层
学习收藏 谢谢
发表于 2009-8-7 00:34:29 | 显示全部楼层
学习收藏 谢谢
发表于 2009-9-2 12:06:55 | 显示全部楼层
不错,学习收藏了
发表于 2009-10-9 16:54:29 | 显示全部楼层
学习了,非常感谢!!
发表于 2011-3-3 10:57:25 | 显示全部楼层
不错,学习了,
发表于 2011-4-5 01:42:24 | 显示全部楼层
不错,学习了,
发表于 2011-4-25 18:30:00 | 显示全部楼层
很实用 可以用作下载的列表
发表于 2011-4-27 16:01:55 | 显示全部楼层
so good!!!thank you!!!!!!!!!!
发表于 2011-8-14 01:37:11 | 显示全部楼层
還不賴 謝囉~
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-25 17:11 , Processed in 0.088703 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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