Sign in to follow this  
Followers 0
=sinister=

Get All Text From a ListBox?

3 posts in this topic

I'm trying to make an Array from the Items of a ListBox, but I do not know how to get all the items from a listbox?

Share this post


Link to post
Share on other sites



#include <GUIListBox.au3>
#include <Array.au3>
Dim $azArray[1]
$hGUI = GUICreate("Test", 300, 300)
$hListBox = GUICtrlCreateList("Test", 0, 0)
GUICtrlSetData(-1, "Hi|Sup|Hola")
GUISetState()

For $i = 0 To _GUICtrlListBox_GetCount($hListBox) - 1
    $azArray[$i] = _GUICtrlListBox_GetText($hListBox, $i)
    ReDim $azArray[UBound($azArray) + 1]
Next

_ArrayDisplay($azArray)
While 1
    Switch GUIGetMsg()
        Case - 3
            Exit
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Exactly what I was looking for, great example, and fast! Thanks!

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