topten Posted February 13, 2015 Share Posted February 13, 2015 How can I set background color with _GUICtrlListView_Create? Great thanx in advance! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 13, 2015 Moderators Share Posted February 13, 2015 topten,Did you even look in the Help file before posting? A cursory glance would have found _GUICtrlListView_SetBkColor. 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...
topten Posted February 13, 2015 Author Share Posted February 13, 2015 Ah, shame of me! Thanx, Melba23 Link to comment Share on other sites More sharing options...
topten Posted February 13, 2015 Author Share Posted February 13, 2015 Some testing, and I get strange situation- I have the background filled in, but when I add the data it "eats the color away" expandcollapse popup#include <ColorConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $idListview $Main_GUI = GUICreate("ListView Set BkColor", 400, 300) ; $idListview = GUICtrlCreateListView("", 2, 2, 394, 268) $hListView2 = _GUICtrlListView_Create( $Main_GUI, "1| 2 |3 | 4| 5 | 6|7|8|9", 0, 0, 400, 200) _GUICtrlListView_SetExtendedListViewStyle($hListView2, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_DOUBLEBUFFER)) Global $iListBkColor = 0x0000CC _GUICtrlListView_SetBkColor($hListView2, 0x8B6F66) ;GUICtrlSetBkColor($hListView2, $iListBkColor) ;GUICtrlSetBkColor($hListView2, 0xEAFAF3) GUISetState(@SW_SHOW) _GUICtrlListView_AddItem($hListView2, 1,0) _GUICtrlListView_AddSubItem($hListView2, 0, "1", 1) _GUICtrlListView_AddSubItem($hListView2, 0, "2", 2) _GUICtrlListView_AddSubItem($hListView2, 0, "3", 3) _GUICtrlListView_AddSubItem($hListView2, 0, "4", 4) _GUICtrlListView_AddSubItem($hListView2, 0, "5", 5) _GUICtrlListView_AddSubItem($hListView2, 0, "6", 6) _GUICtrlListView_AddSubItem($hListView2, 0, "7", 7) _GUICtrlListView_AddSubItem($hListView2, 0, "8", 8) _GUICtrlListView_AddSubItem($hListView2, 0, "9", 9) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example What can be the reason for that? Link to comment Share on other sites More sharing options...
Moderators Solution Melba23 Posted February 13, 2015 Moderators Solution Share Posted February 13, 2015 topten,Still too lazy to look in the Help file? Is it really too difficult to look a little further down the list of ListView UDF functions and find a likely candidate such as _GUICtrlListView_SetTextBkColor? 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...
topten Posted February 13, 2015 Author Share Posted February 13, 2015 Shame of me second time.Thanx, Melba23 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