WildByDesign Posted February 24 Posted February 24 I have a single line showing from a Listview control. Does anyone have any tricks for hiding it? I have tried all of the various border options but could not figure out any way to hide it. I am assuming that I need some other GUI element type of trick to go over top of it to hide it. Thank you for your time. Screenshot:
Nine Posted February 24 Posted February 24 You could use GDI+ graphic to draw a line over it ? Providing the base code instead of a screen shot would help us to suggest a more precise solution... “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
WildByDesign Posted February 24 Author Posted February 24 (edited) I have to admit, I am not familiar with GDI+ yet. The purpose of the empty label is simply to ensure that nobody can actually interact with the listviews. The ACLs are being polled and filled accordingly and at the moment it is just an ACL viewer and not editor. Here is the code: GUICtrlCreateLabel(" ", 100 - 10, $cListViewPosV + 80 - 10, 1200, 800) GUICtrlSetResizing(-1, $GUI_DOCKALL) $idListview = GUICtrlCreateListView("col1", 100, $cListViewPosV + 80, 400, 300, $LVS_NOCOLUMNHEADER, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER)) GUICtrlSetResizing(-1, $GUI_DOCKALL) $sFILE_ALL_ACCESS = GUICtrlCreateListViewItem(" Full Control", $idListview) $sFILE_EXECUTE = GUICtrlCreateListViewItem(" Traverse Folder / Execute File", $idListview) $sFILE_READ_DATA = GUICtrlCreateListViewItem(" List Folder / Read Data", $idListview) $sFILE_READ_ATTRIBUTES = GUICtrlCreateListViewItem(" Read Attributes", $idListview) $sFILE_READ_EA = GUICtrlCreateListViewItem(" Read Extended Attributes", $idListview) $sFILE_WRITE_DATA = GUICtrlCreateListViewItem(" Create Files / Write Data", $idListview) $sFILE_APPEND_DATA = GUICtrlCreateListViewItem(" Create Folders / Append Data", $idListview) _GUICtrlListView_SetColumnWidth($idListview, 0, $LVSCW_AUTOSIZE_USEHEADER) GUICtrlSetState($idListview, $GUI_HIDE) $idListview2 = GUICtrlCreateListView("col1", 480, $cListViewPosV + 80, 400, 300, $LVS_NOCOLUMNHEADER, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_DOUBLEBUFFER)) GUICtrlSetResizing(-1, $GUI_DOCKALL) $sFILE_WRITE_ATTRIBUTES = GUICtrlCreateListViewItem(" Write Attributes", $idListview2) $sFILE_WRITE_EA = GUICtrlCreateListViewItem(" Write Extended Attributes", $idListview2) $sFILE_DELETE_CHILD = GUICtrlCreateListViewItem(" Delete Subfolders and Files", $idListview2) $sFILE_DELETE = GUICtrlCreateListViewItem(" Delete", $idListview2) $sREAD_CONTROL = GUICtrlCreateListViewItem(" Read Permissions", $idListview2) $sWRITE_DAC = GUICtrlCreateListViewItem(" Change Permissions", $idListview2) $sWRITE_OWNER = GUICtrlCreateListViewItem(" Take Ownership", $idListview2) EDIT: Also, the listview overlap slightly on purpose as a way of getting rid of the line from the first listview. Both listviews show a line on the right side. Edited February 24 by WildByDesign
Solution Nine Posted February 24 Solution Posted February 24 I see. You could use something like this instead of creating 2 listviews : #include <WindowsConstants.au3> #include <GUIListView.au3> #include <GUIConstants.au3> GUICreate("Example", 300, 300) Local $idListView = GUICtrlCreateListView("Test", 10, 10, 280, 280, $LVS_NOCOLUMNHEADER + $LVS_SINGLESEL, $LVS_EX_CHECKBOXES) _GUICtrlListView_SetView($idListView, 3) Local $aTest[5] = ["test1", "test2", "test3", "test4", "test5"] For $i = 0 To UBound($aTest) - 1 GUICtrlCreateListViewItem($aTest[$i], $idListView) Next GUISetState() While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ps. Next time, please provide runable code, not just a part of a script. You need to help us to help you... WildByDesign 1 “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
WildByDesign Posted February 24 Author Posted February 24 That’s my mistake, I apologize. Every single snippet of code examples on the forum that have helped me were runnable code in nice, small examples. So I understand. It wastes more time if it’s not readily runnable. I will try your example after dinner and also post a small, runnable example of the issue. Nine 1
WildByDesign Posted February 24 Author Posted February 24 I got a chance to try it out right now. Following your suggestion, I added the line: _GUICtrlListView_SetView($idListView, 3) That worked like absolute magic. Thank you. That was a good, proper fix.
Nine Posted February 24 Posted February 24 1 hour ago, WildByDesign said: like absolute magic “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
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