FinalVersion Posted February 10, 2010 Share Posted February 10, 2010 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 [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
FinalVersion Posted February 10, 2010 Author Share Posted February 10, 2010 Ah, adding a "|" at t he end of each line worked. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now