Advertisement
ThanChet

checkitem_lítview

Feb 1st, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.19 KB | None | 0 0
  1. #include <GUIConstantsEx.au3>
  2. #include <WindowsConstants.au3>
  3. #include <ListviewConstants.au3>
  4. #include <guilistview.au3>
  5.  
  6. GUICreate("listview items", 300, 200, -1, -1)
  7.  
  8. $listview = GUICtrlCreateListView("col1        |col2       |col3 ", 10, 10, 200, 150)
  9. $button = GUICtrlCreateButton("Start", 75, 170, 70, 20)
  10. GUICtrlCreateListViewItem("item1|col22|", $listview)
  11. GUICtrlCreateListViewItem("item2|col12|col13", $listview)
  12. GUICtrlCreateListViewItem("item3|c3332|", $listview)
  13.  GUICtrlCreateListViewItem("item4|44444|col33", $listview)
  14.  GUICtrlCreateListViewItem("item5|5555|col33", $listview)
  15. GUISetState()
  16.  
  17. While 1
  18.     Switch GUIGetMsg()
  19.         Case -3
  20.             Exit
  21.         Case $button
  22.             _Start()
  23.     EndSwitch
  24. WEnd
  25.  
  26. Func _Start()
  27. ;~  _GUICtrlListView_SetItemSelected($listview, 0)
  28.     $dataitem = GUICtrlRead(GUICtrlRead($listview))
  29.     $GetColItem = StringSplit($dataitem, "|")
  30.     If $GetColItem[3] = "" Then; kiểm tra dữ liệu cột 3
  31.         ;Đén đây thì bó tay. Vậy mong Pro trợ giúp, xin trân thành cảm ơn.
  32.         ;Làm sao để kiêm tra cột 3 khi có dữ liệu trống thì nó sẽ chuyển sang item tiếp theo
  33.     Else
  34.         MsgBox(0,"", GUICtrlRead(GUICtrlRead($listview)))
  35.     EndIf
  36.  
  37. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement