ShadowElf Posted November 2, 2009 Share Posted November 2, 2009 If i have a list $Form1_1 = GUICreate("ShadowPOS", 801, 601, 217, 156) $List1 = GUICtrlCreateListView("Codbar|Produs", 22, 120, 553, 260) GUICtrlCreateListViewItem("asd|asd", $list1) GUICtrlCreateListViewItem("fds|fdsdsf", $list1) GUICtrlCreateListViewItem("asdasd|fdsdsf", $list1) $List2 = GUICtrlCreateListView("Codbar|Produs", 1, 2, 3, 6) $insert = GUICtrlCreateButton("INSERT", 505, 470, 65, 57) How to insert a item from list1 in list2? thx I like IT: php, mysql, codeingiter, css, jquery and AUTOIT Link to comment Share on other sites More sharing options...
Zedna Posted November 2, 2009 Share Posted November 2, 2009 (edited) Look into "C:\Program Files\AutoIt3\autoit.chm" at User Defined Functions/GuiListView Management _GUICtrlListView_GetItemCount _GUICtrlListView_GetItemText _GUICtrlListView_InsertItem ... Edited November 2, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ShadowElf Posted November 2, 2009 Author Share Posted November 2, 2009 Look into "C:\Program Files\AutoIt3\autoit.chm" at User Defined Functions/GuiListView Management_GUICtrlListView_GetItemCount_GUICtrlListView_GetItemText_GUICtrlListView_InsertItem...thx, that i understandbut from list 1 I must slect 1 item and insert into the second list when I press a buton. How i get the "selected" item id? I like IT: php, mysql, codeingiter, css, jquery and AUTOIT Link to comment Share on other sites More sharing options...
Authenticity Posted November 2, 2009 Share Posted November 2, 2009 Look up _GUICtrlListView_GetSelectedIndices() in the help file. Link to comment Share on other sites More sharing options...
Zedna Posted November 2, 2009 Share Posted November 2, 2009 Look up _GUICtrlListView_GetSelectedIndices() in the help file.Or _GUICtrlListView_GetNextItem() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Manjish Posted November 3, 2009 Share Posted November 3, 2009 This is what you need: #include <GUIConstantsEx.au3> #include<GUIlistview.au3> $Form1_1 = GUICreate("ShadowPOS", 801, 601, 217, 156) $List1 = GUICtrlCreateListView("Codbar|Produs", 22, 120, 300, 260,"",$LVS_EX_CHECKBOXES) GUICtrlCreateListViewItem("asd|asdsub", $list1) GUICtrlCreateListViewItem("fds|fdsdsf", $list1) GUICtrlCreateListViewItem("asdasd|fdsdsf", $list1) $List2 = GUICtrlCreateListView("Item1|Item2", 350, 120, 300, 260) $insert = GUICtrlCreateButton("INSERT", 505, 470, 65, 57) guisetstate(@sw_show) while 1 $msg=GUIGetMsg() Switch $msg Case $gui_event_close Exit Case $insert For $i=0 to _GUICtrlListView_GetItemCount($List1) If _GUICtrlListView_GetItemChecked($List1,$i) Then $c=_GUICtrlListView_GetItemCount($List2) _GUICtrlListView_AddItem($List2,_GUICtrlListView_GetItemText($List1,$i,0)) _GUICtrlListView_AddSubItem($List2,$c,_GUICtrlListView_GetItemText($List1,$i,1),1) EndIf Next EndSwitch WEnd [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
ShadowElf Posted November 3, 2009 Author Share Posted November 3, 2009 thx all, it works I like IT: php, mysql, codeingiter, css, jquery and AUTOIT 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