Jump to content

(SOLVED) another listview question...


Recommended Posts

so i have a GUI with a listview, and in that listview are two colums, called username and password.

the population of those colums i have managed myself.

but now i want to get the info from both colums together, when user presses a button.

so it is put in a array or something, so it groups the username and password in 1 array, which i can split up and use in another function.

any one a example for me?

thanx in advance

damian666

Edited by damian666
and proud of it!!!
Link to comment
Share on other sites

ok, just one more then i am almost there man, i get how to retrieve the main itemtext, and the subitem text is working for my first entry, but after that, i am getting wrong info.

$info = GUICtrlRead($ListView1)
Select
    Case $info = 6
        $name = _GUICtrlListView_GetItemText($ListView1, 0)
        $pass = _GUICtrlListView_GetItemText($ListView1, 0, 1)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 7
        $name = _GUICtrlListView_GetItemText($ListView1, 1)
        $pass = _GUICtrlListView_GetItemText($ListView1, 0, 2)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 8
        $name = _GUICtrlListView_GetItemText($ListView1, 2)
        $pass = _GUICtrlListView_GetItemText($ListView1, 0, 3)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 9
        $name = _GUICtrlListView_GetItemText($ListView1, 3)
        $pass = _GUICtrlListView_GetItemText($ListView1, 0, 4)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 10
        $name = _GUICtrlListView_GetItemText($ListView1, 4)
        $pass = _GUICtrlListView_GetItemText($ListView1, 0, 5)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case Else
        MsgBox(0, "Debug Window", "No username and serial selected...")
EndSelect

can you please point out where my fault is located?

thanx again man

damian666

and proud of it!!!
Link to comment
Share on other sites

$info = GUICtrlRead($ListView1)
Select
    Case $info = 6
        $name = _GUICtrlListView_GetItemText($ListView1, 0)
        $pass = _GUICtrlListView_GetItemText($ListView1, 0, 1)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 7
        $name = _GUICtrlListView_GetItemText($ListView1, 1)
        $pass = _GUICtrlListView_GetItemText($ListView1, 1, 1)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 8
        $name = _GUICtrlListView_GetItemText($ListView1, 2)
        $pass = _GUICtrlListView_GetItemText($ListView1, 2, 1)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 9
        $name = _GUICtrlListView_GetItemText($ListView1, 3)
        $pass = _GUICtrlListView_GetItemText($ListView1, 3, 1)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case $info = 10
        $name = _GUICtrlListView_GetItemText($ListView1, 4)
        $pass = _GUICtrlListView_GetItemText($ListView1, 4, 1)
        MsgBox(0, "Debug Window", $name & @CRLF & $pass)
    Case Else
        MsgBox(0, "Debug Window", "No username and serial selected...")
EndSelect

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...