ListView问题
#include <GUIConstantsEx.au3>#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Global $gu_Form1 = GUICreate('Demo', 481, 271, -1, -1)
Global $gu_ListView1 = GUICtrlCreateListView('第一列|第二列|第三列', 16, 24, 441, 209)
Global $gua_ListViewItems
_Main()
Exit
Func _Main()
$gua_ListViewItems = GUICtrlCreateListViewItem('第一行|我是第一行|测试数据', $gu_ListView1)
$gua_ListViewItems = GUICtrlCreateListViewItem('第二行|我是第二行|测试数据', $gu_ListView1)
$gua_ListViewItems = GUICtrlCreateListViewItem('第三行|我是第三行|测试数据', $gu_ListView1)
GUISetState(@SW_SHOW)
Local $nMsg
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gua_ListViewItems
MsgBox(0 + 64, 'Demo', '你单击了第一行', 0, $gu_Form1)
Case $gua_ListViewItems
MsgBox(0 + 64, 'Demo', '你单击了第二行', 0, $gu_Form1)
Case $gua_ListViewItems
MsgBox(0 + 64, 'Demo', '你单击了第三行', 0, $gu_Form1)
EndSwitch
WEnd
EndFunc ;==>_MainGlobal $gua_ListViewItems 中的4不固定,有时候肯能是30+还有
Case $gua_ListViewItems这个循环判断句,难道 $gua_ListViewItems中的4 如果是99999我要写9999次判断句吗
页:
[1]