找回密码
 加入
搜索
查看: 2182|回复: 6

[AU3基础] Listview无法读取和隐藏列的问题..每次我都觉得找到问题但是还是有问题

  [复制链接]
发表于 2011-11-24 11:45:35 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <DateTimeConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiStatusBar.au3>
#include <StaticConstants.au3>
#include <ListViewConstants.au3>
#include <GUIListBox.au3>

Global $w_d, $h_d, $listview5
$Title = "管理系统v0.01"

$w_d = @DesktopWidth * 0.85
$h_d = @DesktopHeight * 0.85
$Form1 = GUICreate($Title, $w_d, $h_d, 50, 1)
GUICtrlCreateGroup("", 8, 32, $w_d - 30, ($h_d / 2) + 20)
$ListView1 = GUICtrlCreateListView("Wait|32312|", 16, 70, ($w_d - 30) / 2 - 50, ($h_d - 60) / 2)
For $i = 1 To 301
        GUICtrlCreateListViewItem("3213|3213", $ListView1)
Next
GUICtrlSetFont(-1, 12, 400, 0, "Arial")
$F_button = GUICtrlCreateButton("开始", (($w_d - 30) / 2 + 140), ($h_d - 60) / 2 + 30, 65, 24, $BS_FLAT)
GUISetState(@SW_SHOW)
While 1
        $nMsg = GUIGetMsg()
        Select
                Case $nMsg = $GUI_EVENT_CLOSE
                        
                        
                        
                        Exit
                Case $nMsg = $F_button
                        A_GUI()
        EndSelect
WEnd
Func A_GUI()
        $Form2 = GUICreate("记录", $w_d / 2, $h_d / 1.3)
        GUICtrlCreateGroup("  记录添加", 7, 8, $w_d / 2 - 20, $h_d / 1.3 - 20)
        $save = GUICtrlCreateButton("保  存", 112, $h_d / 1.3 - 40, 43, 24, $BS_FLAT)
        $exit = GUICtrlCreateButton("退  出", 224, $h_d / 1.3 - 40, 43, 24, $BS_FLAT)
        $listview5 = GUICtrlCreateListView("ID|3123|状态", 20, 280, 360, 150)
        _GUICtrlListView_HideColumn($listview5, 0)

        GUISetState(@SW_SHOW);显示gui

        While 1
                $Msg = GUIGetMsg()
                Select
                        Case $Msg = $GUI_EVENT_CLOSE Or $Msg = $exit
                                GUIDelete($Form2)
                                ExitLoop
                        Case $Msg = $save
                EndSelect

        WEnd

EndFunc   ;==>A_GUI


打开后只要按开始,可以看到第一列没有成功隐藏
但是如果把listview1的项数改成偶数他就可以成功
包括input添加按钮添加都会改变这样的情况,就是奇偶数可以改变这样的listview
有人知道么?
我已经困扰一个礼拜了,是不是bug我的版本比较低
发表于 2011-11-24 11:59:02 | 显示全部楼层
3.3.7.15未回显
 楼主| 发表于 2011-11-24 12:12:28 | 显示全部楼层
你去掉一个循环试试看,或者把循环增大
我版本是3.3.1.4
 楼主| 发表于 2011-11-24 13:38:29 | 显示全部楼层
更新新版本问题消失...
公司无法下载exe文件,还真辛苦
发表于 2011-11-24 21:08:03 | 显示全部楼层
回复 4# sour
版本还有这个问题,不了解啊!
 楼主| 发表于 2011-11-25 10:34:11 | 显示全部楼层
回复  sour
版本还有这个问题,不了解啊!
xms77 发表于 2011-11-24 21:08


就是阿
太坑爹了,怎么也想不到有这样的事情,我还以为什么地方有冲突,搞了一个礼拜了
发表于 2011-11-25 15:58:13 | 显示全部楼层
回复 6# sour
说你是中奖了,还是发现了Bug好呢?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 02:39 , Processed in 0.081746 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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