#include <EditConstants.au3>
#include <GUIListBox.au3>
#Include <GuiListView.au3>
#Include <WinAPI.au3>
#include <Constants.au3>
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$List1 = GUICtrlCreateListView("1111|22222|33333|444 ", 8, 8, 601, 383)
$item=GUICtrlCreateListViewItem("1|2|3|4",$List1)
$Input1 = GUICtrlCreateInput("200", 360, 411, 105, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $List1
$hid=GUICtrlGetState($List1) ;获取鼠标点的是哪个列
$width=Int(GUICtrlRead($Input1)) ;读取要修改的宽度。
_GUICtrlListView_SetColumnWidth($List1, $hid, $width)
EndSwitch
WEnd
想修改哪个列宽 直接在哪个上点。 |