Sign in to follow this  
Followers 0
darkshark

get all item checked in listview?

3 posts in this topic

#1 ·  Posted (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 by darkshark

Share this post


Link to post
Share on other sites



have you looked at _GUICtrlListView_GetSelectedIndices


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."

 

WindowsError.gif

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 :x

thanks

Edited by darkshark

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0