darkshark Posted January 11, 2011 Share Posted January 11, 2011 (edited) how to i get all items checked in on listview? i tried the _GUICtrlListView_GetItemChecked() but this function only return if this is checked or no how to i get one array with contains all itens checked? edit: and how to i get the colunm text? thankyou so much! Edited January 11, 2011 by darkshark Link to comment Share on other sites More sharing options...
nitekram Posted January 11, 2011 Share Posted January 11, 2011 have you looked at _GUICtrlListView_GetSelectedIndices 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
darkshark Posted January 11, 2011 Author Share Posted January 11, 2011 (edited) have you looked at _GUICtrlListView_GetSelectedIndices but i need to get Checked indices, not selected but i maked this function! Func _GuiCtrlListView_GetChecked($hWnd, $Text = True, $Column = 0) Local $rows = _GUICtrlListView_GetItemCount($hWnd) -1, $n = 1, $SeparatorChar = Opt('GUIDataSeparatorChar'), $Columns If $rows = 0 Then Return SetError(1) If $Text And (Not StringRegExp($Column, "\d+") Or $Column < 0 Or $Column > _GUICtrlListView_GetColumnCount($hWnd)) Then $Column = 0 Local $sArray[$n][2] For $i = 0 To $rows If _GUICtrlListView_GetItemChecked($hWnd, $i) Then ReDim $sArray[$n+1][2] $sArray[$n][0] = $i If $Text Then $Columns = StringSplit(_GUICtrlListView_GetItemTextString($hWnd, $i), $SeparatorChar, 1) $sArray[$n][1] = $Columns[$Column+1] $n += 1 EndIf EndIf Next $sArray[0][0] = UBound($sArray) -1 If Not $Text Then ReDim $sArray[$n][1] Return $sArray EndIf Return $sArray EndFunc i try to use this later, because now I'm without my project here but, thankyou so much! EDIT: I tested it and it worked perfectly, is there anyone who wants to use available ;D thanks Edited January 11, 2011 by darkshark Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now