AngelofDeath Posted November 26, 2010 Share Posted November 26, 2010 (edited) Edited November 28, 2010 by AngelofDeath Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 26, 2010 Moderators Share Posted November 26, 2010 AngelofDeath, To get grid lines to show on a ListView, you have to set the background colour to something other than the default. Does this produce what you want? #include <GUIConstantsEx.au3> #include <ListviewConstants.au3> $hGUI = GUICreate("Test", 500, 500) $listview_1 = GUICtrlCreateListView("A|B|C|D|E|F|G|H", 10, 10, 250, 250, -1, $LVS_EX_GRIDLINES) GUICtrlSetBkColor(-1, 0xE0E0E0) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 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...
Moderators Melba23 Posted November 26, 2010 Moderators Share Posted November 26, 2010 AngelofDeath,LOL, what'chu talkin' 'bout, Melba23?If I create a ListView using the $LVS_EX_GRIDLINES extended style, either with or without added items, I only get to see gridlines when I colour the background of the control. No doubt it is something to do with my monitor and Windows colour settings. To get grid lines to show on a ListView, you have to add a ListViewItemNot so. The gridlines appear regardless of whether or not the ListView has content. Anyway, I am delighted my attempt to help caused you such amusement. Perhaps if you had made your original question a litle clearer we could both have saved some wear and tear on our typing fingers. 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...
rover Posted November 27, 2010 Share Posted November 27, 2010 (edited) That's interesting; I often forget that things don't always look or work the same for everyone. Could it be OS related? I'm on XP Pro SP3. To be honest, I'm sorry I asked this question in the first place. Before this topic, my line of thought was that I couldn't get the ListView to look the way I wanted because I didn't know how to do it. Now I know the real reason is because of a forced style that I can't do anything about. This pisses me off a bit because I see no reason for it. I was happy not knowing. you are mixing window ex styles with listview ex styles in the last param the result is you are adding WS_EX_DLGMODALFRAME and $WS_EX_TRANSPARENT to WS_EX_CLIENTEDGE window ex style use LVM_SETEXTENDEDLISTVIEWSTYLE message for listview extended styles #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <ListviewConstants.au3> #include <WindowsConstants.au3> #Include <GuiListView.au3> Global $iExStyle = BitOR($WS_EX_CLIENTEDGE, $LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES) ConsoleWrite('!iExStyle = 0x' & Hex($iExStyle, 8) & @crlf) $iExStyle = BitOR($WS_EX_CLIENTEDGE, $WS_EX_DLGMODALFRAME, $WS_EX_TRANSPARENT) ConsoleWrite('!iExStyle = 0x' & Hex($iExStyle, 8) & @crlf) GUICreate("ListViews", 530, 270) ; Deafault ListView Global $listview_1 = GUICtrlCreateListView("A|B|C|D|E|F|G|H", 10, 10, 250, 250, -1, $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($listview_1, $LVS_EX_FULLROWSELECT) ; Deafault ListView with Grid Lines Global $listview_2 = GUICtrlCreateListView("A|B|C|D|E|F|G|H", 270, 10, 250, 250, -1, $WS_EX_CLIENTEDGE) _GUICtrlListView_SetExtendedListViewStyle($listview_2, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) ; Add a ListViewItem to each ListView GUICtrlCreateListViewItem("1|2|3|4|5|6|7|8", $listview_1) GUICtrlCreateListViewItem("1|2|3|4|5|6|7|8", $listview_2) GUISetState() While 1 If GUIGetMsg() = -3 Then Exit WEnd Edited November 27, 2010 by rover I see fascists... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 27, 2010 Moderators Share Posted November 27, 2010 rover, Thanks for that - my (first) learning point of the day. 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