Jewtus 17 Report post Posted June 2, 2016 (edited) I'm working on a UI with add 1 and add all buttons. This is some example code: $gui=GUICreate("Selector", 951, 268, 192, 114) $Label1 = GUICtrlCreateLabel("Not Marked", 8, 6, 58, 17) $Label2 = GUICtrlCreateLabel("Marked", 504, 6, 81, 17) Global $idlvMarked= GUICtrlCreateListView("", 496, 24, 450, 198) _GUICtrlListView_RegisterSortCallBack($idlvMarked) $btnAdd1 = GUICtrlCreateButton(">", 459, 24, 27, 25) $btnAddAll = GUICtrlCreateButton(">>", 459, 49, 27, 25) Global $idlvNotMarked = GUICtrlCreateListView("", 0, 24, 450, 198) _GUICtrlListView_RegisterSortCallBack($idlvNotMarked) $btnRemove1 = GUICtrlCreateButton("<", 459, 193, 27, 25) $btnRemoveAll = GUICtrlCreateButton("<<", 459, 168, 27, 25) $btnUpdate = GUICtrlCreateButton("Update", 448, 232, 51, 25) GUICtrlSetState($btnProjectEdit,$GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete($gui) ExitLoop Case $btnAdd1 $sProjectID=StringSplit(_GUICtrlListView_GetItemTextString($idlvNotMarked),"|")[1] If $sProjectID<> "" Then _GUICtrlListView_CopyItems($idlvNotMarked,$idlvMarked,True) Case $btnAddAll $sProjectID=StringSplit(_GUICtrlListView_GetItemTextString($idlvNotMarked),"|")[1] ;???????????? Case $btnRemove1 $sProjectID=StringSplit(_GUICtrlListView_GetItemTextString($idlvMarked),"|")[1] If $sProjectID<> "" Then _GUICtrlListView_CopyItems($idlvMarked,$idlvNotMarked,True) EndSwitch WEnd Anyone have any clever ideas on how to do this in a simple way? Edited June 2, 2016 by Jewtus Share this post Link to post Share on other sites
Damein 18 Report post Posted June 2, 2016 Maybe use an INI file? Adding 1 will add a new key, adding all will add the entire section? Most recent sig. I madeQuick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Share this post Link to post Share on other sites
Jewtus 17 Report post Posted June 2, 2016 Not sure I understand what you mean. I was thinking about locking the GUI so its no repainting and then do a Do statement that moves (select then fire the same command) the first record until there are no more records then unlock the GUI, but that seemed inefficient. Share this post Link to post Share on other sites
Jewtus 17 Report post Posted June 3, 2016 This is what I did: GUISetState($GUI,@SW_LOCK) $aMover=_GUICtrlListView_CreateArray($idlvNotMarked) _ArrayDelete($aMover,0) _GUICtrlListView_AddArray($idlvMarked,$aMover) _GUICtrlListView_DeleteAllItems($idlvNotMarked) $aMover="" GUISetState($PSMGUI,@SW_UNLOCK) I used @guinness _GUICtrlListView_CreateArray to grab everything and move it. Share this post Link to post Share on other sites