Jump to content

Recommended Posts

Posted (edited)

Hi Guys, I have a problem hope someone can help me. Many thanks.

The Picture is the GUI of my auto-test. I want to clear all the items in the right Listbox via press Clear button. 

Part of Code

=======================================================================================


 

Func btnAdd()

     $rightmoveitem = GUICtrlRead($ListAvaiCom)
     If StringStripWS($rightmoveitem, 8) Then
            ConsoleWrite($rightmoveitem & @CRLF)
            GUICtrlSetData($ListChoCom, $rightmoveitem)
            $iSel = _GUICtrlListBox_GetCurSel($ListAvaiCom)
            _GUICtrlListBox_DeleteString($ListAvaiCom, $iSel)
      EndIf

EndFunc

Func btnRemove()

     $leftmoveitem = GUICtrlRead($ListChoCom)
     If StringStripWS($leftmoveitem, 8) Then
            ConsoleWrite($leftmoveitem & @CRLF)
            GUICtrlSetData($ListAvaiCom, $leftmoveitem)
            $iSel = _GUICtrlListBox_GetCurSel($ListChoCom)
           _GUICtrlListBox_DeleteString($ListChoCom, $iSel)
     EndIf

EndFunc

Func btnClear()

    ;_GUICtrlListBox_ResetContent($ListChoCom)

EndFunc

====================================================================================

with this code I only can clear all the items of right listbox, but cannot put those items back to the left box.

below is the screenshot. Thank you very much.

QQ图片20160624173507.png

Edited by Codartizan
Posted

Please use the <> Code-Tag for posting scriptcode. Also a running (reproducer-) script is better than a picture. With scriptcode copy and paste is possible, without the helper must script a GUI. And as i think, there's no need that help willing people have more work as needed. 

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
  • Recently Browsing   0 members

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