ufukkreis853 Posted December 5, 2023 Posted December 5, 2023 Hello again, I am writing using Google Translate as I do not speak English. I'm sorry for that. Coming to the question, I learned from the site that the color of the title section of the list can be changed in different ways, but I could not adapt it to my own codes. As a solution, I thought of putting a button in the title section of the list and coloring it. Of course, while doing this, I turn the list off so that the list size is not adjusted and it would be nice if the button was colored, as it would look like the title color. But when I add a button, the button remains at the bottom of the list. How can I solve this?
Nine Posted December 5, 2023 Posted December 5, 2023 Please provide minimal (but runable and self-sufficient) code to show your issue, then it will be easier for us to help you “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ufukkreis853 Posted December 6, 2023 Author Posted December 6, 2023 #RequireAdmin #NoTrayIcon #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <GuiMenu.au3> #include <WindowsConstants.au3> $main = GUICreate("autoit", 400, 400) $list = GUICtrlCreateListView("demo", 15, 15 , 300, 300) GUICtrlSendMsg($list, $lvm_setcolumnwidth, 0, 290) ControlDisable($main, "", HWnd(_GUICtrlListView_GetHeader($list))) $button = GUICtrlCreateButton("new list header", 15, 10, 300, 40) ; The button must remain at the top of the list GUICtrlSetColor($button, 0xcccccc) GUICtrlSetBkColor($button, 0x191919) GUISetState(@SW_SHOW, $main) While 1 $nmsg = GUIGetMsg() Switch $nmsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd The button must remain at the top of the list
Andreik Posted December 6, 2023 Posted December 6, 2023 What exactly do you want to do? The controls are not drawn how do you think. If you don't want the list view header just use $LVS_NOCOLUMNHEADER as style and place a button above the list view, just don't overlap controls like that.
ufukkreis853 Posted December 6, 2023 Author Posted December 6, 2023 38 minutes ago, Andreik said: What exactly do you want to do? The controls are not drawn how do you think. If you don't want the list view header just use $LVS_NOCOLUMNHEADER as style and place a button above the list view, just don't overlap controls like that. $LVS_NOCOLUMNHEADER when I remove the title with this method $lvs_ex_checkboxes not actived
Andreik Posted December 6, 2023 Posted December 6, 2023 I don't know what are you talking about. $LVS_EX_CHECKBOXES it's not used by default but what stops you to use it? ;~ #RequireAdmin #NoTrayIcon #include <GuiConstantsEx.au3> #include <GuiListView.au3> ;~ #include <GuiMenu.au3> #include <WindowsConstants.au3> $main = GUICreate("autoit", 400, 400) $list = GUICtrlCreateListView("demo", 15, 50 , 300, 300, $LVS_NOCOLUMNHEADER, $LVS_EX_CHECKBOXES) GUICtrlSendMsg($list, $lvm_setcolumnwidth, 0, 290) GUICtrlCreateListViewItem('Test', $list) $button = GUICtrlCreateButton("new list header", 15, 10, 300, 40) ; The button must remain at the top of the list GUICtrlSetColor($button, 0xcccccc) GUICtrlSetBkColor($button, 0x191919) GUISetState(@SW_SHOW, $main) While 1 $nmsg = GUIGetMsg() Switch $nmsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
ufukkreis853 Posted December 6, 2023 Author Posted December 6, 2023 18 minutes ago, Andreik said: I don't know what are you talking about. $LVS_EX_CHECKBOXES it's not used by default but what stops you to use it? ;~ #RequireAdmin #NoTrayIcon #include <GuiConstantsEx.au3> #include <GuiListView.au3> ;~ #include <GuiMenu.au3> #include <WindowsConstants.au3> $main = GUICreate("autoit", 400, 400) $list = GUICtrlCreateListView("demo", 15, 50 , 300, 300, $LVS_NOCOLUMNHEADER, $LVS_EX_CHECKBOXES) GUICtrlSendMsg($list, $lvm_setcolumnwidth, 0, 290) GUICtrlCreateListViewItem('Test', $list) $button = GUICtrlCreateButton("new list header", 15, 10, 300, 40) ; The button must remain at the top of the list GUICtrlSetColor($button, 0xcccccc) GUICtrlSetBkColor($button, 0x191919) GUISetState(@SW_SHOW, $main) While 1 $nmsg = GUIGetMsg() Switch $nmsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd this work thnx
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