关于ListView控件信息显示长度的问题!(已解决)
本帖最后由 nmgwddj 于 2010-3-7 13:18 编辑我想设置“路径”的长度长一点如何做到。我这空格写多了“路径”后边就有... 不知所措 拓展样式里貌似没有相关内容
代码如下#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 347, 209, 152)
$TreeView1 = GUICtrlCreateTreeView(8, 72, 169, 265, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
$ListView1 = GUICtrlCreateListView("名称 |路径 ", 184, 72, 433, 265)
$run = GUICtrlCreateTreeViewItem("About", $TreeView1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $run
MsgBox(0, '', "a")
EndSwitch
WEnd #include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 347, 209, 152)
$TreeView1 = GUICtrlCreateTreeView(8, 72, 169, 265, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE)
$ListView1 = GUICtrlCreateListView("名称 |路径", 184, 72, 433, 265)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 270)
$run = GUICtrlCreateTreeViewItem("About", $TreeView1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $run
MsgBox(0, '', "a")
EndSwitch
WEnd GOOD 非常感谢!:face (37): 空格毕竟不是...
下面有两种比较正规的方法。我的收藏。
#Include <GuiListView.au3>
_GUICtrlListView_AddColumn($listview1, "任务", 150)
_GUICtrlListView_AddColumn($listview1, "状态", 50)
;已经有表头的情况下设置宽度
_GUICtrlListView_SetColumnWidth($ListView1, 0, 130);第一列
_GUICtrlListView_SetColumnWidth($ListView1, 1, 100);第二列 感谢楼上的。你的代码也一样成功:face (37): 现在的论坛开始活跃起来了 支持 谢谢了,楼上的仨位啊 呵呵,路过{:face (114):}
页:
[1]