帮忙给个ListView多选操作实例。。谢谢
如题。。。listview的多选操作实例。。。[ 本帖最后由 forgetdu 于 2008-12-1 21:20 编辑 ] 自己给自己顶一下吧。。。希望哪位大侠告知一声啊。。谢谢。。 _GuiCtrlListView_SetItemSelected($list1,0)
_GuiCtrlListView_SetItemSelected($list1,1)
_GuiCtrlListView_SetItemSelected($list1,2)
同时选中第1,2,3行 #include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <TreeViewConstants.au3>
$Form1_1 = GUICreate("", 520, 250)
GUICtrlCreateLabel("选择要安装的组件:", 10, 10, 500, 20)
$TreeView1 = GUICtrlCreateTreeView(10, 30, 500, 170, $TVS_HASBUTTONS + $TVS_HASLINES + $TVS_LINESATROOT + $TVS_CHECKBOXES, $WS_EX_CLIENTEDGE)
GUICtrlSetBkColor(-1, 0xF1EFE2)
$TreeView1_0 = GUICtrlCreateTreeViewItem("主程序(Unicode)", $TreeView1)
$TreeView1_1 = GUICtrlCreateTreeViewItem("各种音频文件格式", $TreeView1)
$TreeView1_2 = GUICtrlCreateTreeViewItem("AAC", $TreeView1_1)
$TreeView1_3 = GUICtrlCreateTreeViewItem("AC3/DTS", $TreeView1_1)
$TreeView1_4 = GUICtrlCreateTreeViewItem("WMA", $TreeView1_1)
$TreeView1_5 = GUICtrlCreateTreeViewItem("APE", $TreeView1_1)
$TreeView1_6 = GUICtrlCreateTreeViewItem("FlAC", $TreeView1_1)
$TreeView1_7 = GUICtrlCreateTreeViewItem("MPC", $TreeView1_1)
$TreeView1_8 = GUICtrlCreateTreeViewItem("OGG", $TreeView1_1)
$TreeView1_9 = GUICtrlCreateTreeViewItem("RM", $TreeView1_1)
$TreeView1_10 = GUICtrlCreateTreeViewItem("Mod", $TreeView1_1)
$TreeView1_11 = GUICtrlCreateTreeViewItem("编码器插件", $TreeView1)
GUICtrlSetState($TreeView1_1, $GUI_EXPAND)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
EndSelect
Wend 谢谢楼上的代码。。
不过好像不是同一控件啊。。:face (9):
三楼的狼兄。。。能否给点详细点啊。。谢谢。。。
继续给自己顶一下。。
页:
[1]