找回密码
 加入
搜索
查看: 1218|回复: 3

[AU3基础] _GUICtrlListView_DeleteItem 对_GUICtrlListView_AddItem 无效【已解决】

[复制链接]
发表于 2017-8-23 20:05:12 | 显示全部楼层 |阅读模式
本帖最后由 fenhanxue 于 2017-8-23 21:08 编辑
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>

$Form1 = GUICreate("Form1", 506, 405, 192, 114)
$ListView1 = GUICtrlCreateListView("测试", 8, 24, 473, 209)
$Button1 = GUICtrlCreateButton("GUICtrlCreateListViewItem",24, 264, 169, 41 )
$Button2 = GUICtrlCreateButton("_GUICtrlListView_AddItem", 272, 264, 161, 41 )
$Button3 = GUICtrlCreateButton("删除第三行",104, 352, 281, 41)
GUISetState(@SW_SHOW)


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
                        For $i = 1 To 5
                                GUICtrlCreateListViewItem($i,$ListView1)
                        Next
                Case $Button2
                        For $i = 1 To 5
                                _GUICtrlListView_AddItem($ListView1,$i)
                        Next                        
                Case $Button3
                        _GUICtrlListView_DeleteItem($ListView1,2)
                        

        EndSwitch
WEnd
listview的项目,用 GUICtrlCreateListViewItem 创建,可以_GUICtrlListView_DeleteItem正常删除
用 _GUICtrlListView_AddItem创建的,无法_GUICtrlListView_DeleteItem删除

au3版本:3.3.9.21
发表于 2017-8-23 20:44:55 | 显示全部楼层
3.3.10.x以上版本修正了这个问题
发表于 2017-8-23 21:05:52 | 显示全部楼层
回复 1# fenhanxue


3.3.14.2

本帖子中包含更多资源

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

×
 楼主| 发表于 2017-8-23 21:08:33 | 显示全部楼层
看来的确是版本问题
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-20 12:42 , Processed in 0.070371 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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