Sign in to follow this  
Followers 0
FinalVersion

List Box Questions

2 posts in this topic

Lets say I have a button and when the button is clicked, it adds text to the List Box. But if I click it again, it doesn't add it again. I'm using

GUICtrlSetData()
to add the text.

Anyway, I want the button to add the text every time it's clicked, is this possible? This is what I have so far.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
$frmMain = GUICreate("frmMain", 405, 144, 198, 125)
$btnAdd = GUICtrlCreateButton("Add", 152, 112, 105, 25, $WS_GROUP)
$LCore = GUICtrlCreateList("", 8, 8, 385, 97)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $btnAdd
            GUICtrlSetData($LCore, "Test...")
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

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