Jump to content
Sign in to follow this  
James

ListView: Reading Data

Recommended Posts

James

Hey,

I know I made another topic, but I thought I'd start this one, because in the future it would be easier to find & because I dont want people to get confused.

Basically I have a script that I made (attached). You basically enter, username, password and a user image. It then saves it to names.ini so it can be read later on.

All of this is in a list view. Then you can read the .ini for any records. Once that has happened it sets the List View into a simple way of reading it:

Username | Password | Image Directory

Then when you click a user it should show the picture next to the ListView. But thats where my problem starts. I can make it read the images, but before I even have a chance to import the users, two Lists have been created but there is no text, and you can click one of them, and the image appears.

You will need to create two users when trying it, to see what I am getting at.

I made this script to help me:

Case $iMsg = $GUI_EVENT_PRIMARYDOWN
    $pos = GUIGetCursorInfo()
    $ImportImage = IniReadSection($UserFile, "Image")
    For $b = 1 To $ImportImage[0][0]
        If ($pos[4] == $UserList) Then
        GUICtrlSetImage($UserImage, $ImportImage[$b][1])
                    EndIf
    Next

But, when I start trying to edit users, the image keep showing then it will ask me if I want to edit the users. I know its confusing but I can try and explain again if needs be.

Thankyou,

James

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  

×