bogQ Posted October 3, 2011 Share Posted October 3, 2011 (edited) I got lost in help file and large script that is mostly based on large amounts of ListView can someone tell me how to solve this problem when i double click on listview item i get results like i clicked button, apparently ID is pulling button ID, i know i can put GUICtrlCreateListViewItem after all controls and itl probably solwe it if im not wrong but im wondering is there some alternative that can help me to read data from ListView that isn't with GUICtrlRead(GUICtrlRead($GG2_LW2)) ? #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <GuiListView.au3> Dim $aRecords1 $GG2 = GUICreate('G1',800-230,600,230,0,$WS_POPUP,$WS_EX_TOOLWINDOW+$WS_EX_TOPMOST) GUISetFont(10,800) $GG2_LW2 = GUICtrlCreateListView("", 270, 7, 250, 513) _GUICtrlListView_AddColumn($GG2_LW2, "ID_V", 60) _GUICtrlListView_AddColumn($GG2_LW2, "Name2", 180) GUICtrlCreateListViewItem('ww'&'|'&'gg'&'|'&'bb', $GG2_LW2) $GG2_BT1_Change = GUICtrlCreateButton('get it', 800-230-240,550,200,30) GUICtrlCreateGroup('', 0, -8, 570, 608) GUISetState(@SW_SHOW,$GG2) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $GG2_BT1_Change ConsoleWrite('LW2='&GUICtrlRead(GUICtrlRead($GG2_LW2))&@CRLF) EndSwitch WEnd edit hmm.. thing i got the problem, creating 2 colums but adding 3 colum data O_o Edited October 3, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 3, 2011 Moderators Share Posted October 3, 2011 bogQ,Try not to mix native and UDF functions - not all of the UDF ones work with native created ListViews. I got the 3 columns to show like this:$GG2_LW2 = GUICtrlCreateListView("|ID_V|Name2", 270, 7, 250, 513) _GUICtrlListView_SetColumnWidth($GG2_LW2, 0, 60) _GUICtrlListView_SetColumnWidth($GG2_LW2, 1, 60) _GUICtrlListView_SetColumnWidth($GG2_LW2, 2, 180)Why do you not want to use GUICtrlRead(GUICtrlRead($GG2_LW2))? I agree it is clumsy, but it works. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area 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