如何改变GUICtrlCreateListViewItem的宽度?
注意我是用_GUICtrlListView_SetView($hListView, 4)这个风格的,
我用了_GUICtrlListView_SetColumnWidth这个无效,这个对
_GUICtrlListView_SetView($hListView, 1) 和2、 3 有用,
见代码,见图片,望高手帮忙#include <GuiConstantsEx.au3>
#include <GuiListView.au3>
Global $CounterPage
Global $hListView
GUICreate("ListView Set View", 400, 300)
GUISetState()
$hListView = GUICtrlCreateListView("", 2, 2, 194, 268)
_GUICtrlListView_SetView($hListView, 4)
For $iI = 1 To 5
GUICtrlCreateListViewItem("Item" & $iI & "分组1", $hListView)
GUICtrlSetImage(-1, "shell32.dll", Random(9, 20));设置指定控件的位图或图标
$CounterPage = _GUICtrlListView_GetCounterPage($hListView) - 1;计算在可视区域中可垂直显示的项目数量
_GUICtrlListView_EnableGroupView($hListView);启用控件中的项目分组显示
_GUICtrlListView_InsertGroup($hListView, -1, 1, "分组1");插入分组
_GUICtrlListView_SetItemGroupID($hListView, $CounterPage, 1);设置项目分组编号
Next
; 循环至用户退出
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
|