Trax Posted October 28, 2014 Share Posted October 28, 2014 I have a three column ListView. All three columns are linked. The only scroll bar that is "active" is on column one. The scroll bar is also on column 2 and 3 but doesn't work (as was intended). Is there any way to turn off the scroll bar on columns 2 and 3 so it isn't even visible? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 28, 2014 Moderators Share Posted October 28, 2014 Trax,I have never seen a ListView with scrollbars for each column. Can you please post the code you are using to create it. 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...
Zedna Posted October 29, 2014 Share Posted October 29, 2014 Maybe also screenshot would be good in this case ;-) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Trax Posted October 31, 2014 Author Share Posted October 31, 2014 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Constants.au3> #include <GUIListBox.au3> #include <GUIEdit.au3> #include <GuiListView.au3> #include <Array.au3> #include <ButtonConstants.au3> #include <ScrollBarConstants.au3> #include <MsgBoxConstants.au3> #include <Misc.au3> #include <File.au3> #include <GuiScrollBars.au3> #include <GuiHeader.au3> Local $Index, $LV1, $LV2, $LV3, $L1_EX, $L2_EX, $L3_EX Create_Listview() While 1 Sleep(5000) WEnd Func Create_Listview() Local $Index, $LV1, $LV2, $LV3, $L1_EX, $L2_EX, $L3_EX $GUIhandle = GUICreate("ListView", 680, 575, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX) ;creates the parent window $List1 = GUICtrlCreateListView("Computer Name ", 20, 35, 300, 448, -1, $LVS_EX_DOUBLEBUFFER) $cLabel_1 = GUICtrlCreateLabel("", 20, 35, 300, 448) GUICtrlSetState($cLabel_1, $GUI_DISABLE) GUICtrlSetResizing($cLabel_1, $GUI_DOCKAUTO) GUICtrlSetBkColor($cLabel_1, $GUI_BKCOLOR_TRANSPARENT) _GUICtrlListView_SetExtendedListViewStyle($List1, $LVS_EX_TWOCLICKACTIVATE) $List2 = GUICtrlCreateListView("Date/Time", 355, 35, 190, 450, -1, $LVS_EX_DOUBLEBUFFER) $cLabel_2 = GUICtrlCreateLabel("", 355, 35, 190, 450) GUICtrlSetState($cLabel_2, $GUI_DISABLE) GUICtrlSetResizing($cLabel_2, $GUI_DOCKAUTO) GUICtrlSetBkColor($cLabel_2, $GUI_BKCOLOR_TRANSPARENT) $List3 = GUICtrlCreateListView("RPM", 574, 35, 95, 450, -1, $LVS_EX_DOUBLEBUFFER) $cLabel_3 = GUICtrlCreateLabel("", 574, 35, 95, 450) GUICtrlSetState($cLabel_3, $GUI_DISABLE) GUICtrlSetResizing($cLabel_3, $GUI_DOCKAUTO) GUICtrlSetBkColor($cLabel_3, $GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW) ;shows the GUI window For $Index = 0 To 50 _GUICtrlListView_AddItem($List1, "Name " & $Index) _GUICtrlListView_AddItem($List2, "1:00 pm") _GUICtrlListView_AddItem($List3, $Index) Next EndFunThe code and the screenshot are attached. The code and the screenshot are attached. Column 2 and 3 are linked to column 1 so what I ultimately want to do is get rid of the scroll bar all together on columns 2 and 3. I would also like to take the headers on all three columns to the full column width right off the bat if that is possible. Thanks! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 31, 2014 Moderators Share Posted October 31, 2014 Trax,That is 3 separate ListViews. If they are all linked, why not make them into a single ListView like this? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> Create_Listview() While 1 Sleep(5000) WEnd Func Create_Listview() Local $LV1 $GUIhandle = GUICreate("ListView", 680, 575, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX) ;creates the parent window $List1 = GUICtrlCreateListView("Computer Name|Date/Time|RPM", 20, 35, 580, 448, -1, $LVS_EX_DOUBLEBUFFER) _GUICtrlListView_SetColumnWidth($List1, 0, 300) _GUICtrlListView_SetColumnWidth($List1, 1, 190) _GUICtrlListView_SetColumnWidth($List1, 2, 73) $cLabel_1 = GUICtrlCreateLabel("", 20, 35, 580, 448) GUICtrlSetState($cLabel_1, $GUI_DISABLE) GUICtrlSetResizing($cLabel_1, $GUI_DOCKAUTO) GUICtrlSetBkColor($cLabel_1, $GUI_BKCOLOR_TRANSPARENT) _GUICtrlListView_SetExtendedListViewStyle($List1, $LVS_EX_TWOCLICKACTIVATE) GUISetState(@SW_SHOW) ;shows the GUI window For $Index = 0 To 50 GUICtrlCreateListViewItem("Name " & $Index & "|1:00 pm|" & $Index, $List1) Next EndFuncNow you have the one scrollbar you wanted. 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