#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我的版本比较低 |