qwert Posted February 12, 2017 Share Posted February 12, 2017 I have a special situation where I need a hidden sort field as part of each set of information in a ListView. The actual sort is preformed by the script (_SortItems), so the user never needs to view—or even be aware of—the sort parameter. Can a ListView be defined in a way that prevents the horizontal scroll bar from ever being displayed? Here's a script that shows the situation: #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> Local $array[5][3] = [ ['C:\Program Files','12/01/2016','201'], _ ['D:\Au3 Scripts','07/03/2014','301'], _ ['F:\Downloads','01/01/2017','101'] ] $GUI = GUICreate("ListView Test", 400, 320, -1, 180) $Go = GUICtrlCreateButton("Go", 324, 84, 60, 28) GUICtrlSetTip(-1, "Select a listview entry and click Go") $Elements = GUICtrlCreateListView("", 24, 12, 280, 280) _GUICtrlListView_AddColumn($Elements, "Directory Name", 200) _GUICtrlListView_AddColumn($Elements, "Date", 76) _GUICtrlListView_AddColumn($Elements, "Unseen sort", 76) _GUICtrlListView_AddArray($Elements, $array) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Go $Line = _GUICtrlListView_GetItemTextString($Elements) msgbox(0, "Operation", $Line) EndSwitch WEnd Thanks in advance for any suggestions of what to try. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2017 Moderators Share Posted February 12, 2017 qwert, Just hide the "hidden" column by setting its width to 0: _GUICtrlListView_AddColumn($Elements, "Unseen sort", 0) 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...
qwert Posted February 12, 2017 Author Share Posted February 12, 2017 Wow. I had been looking at that for too long. It works, of course. Thanks for your timely response. Much appreciated. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 12, 2017 Moderators Share Posted February 12, 2017 qwert, Glad I could help. 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