Habland0 Posted August 12, 2010 Share Posted August 12, 2010 1. Is it possible to allow a selected ListView item to be copied to the clipboard when the user presses CTRL+C? 2. Does an equivalent of $LBS_DISABLENOSCROLL exist for ListView controls? (Shows a disabled vertical scroll bar for the list box when the box does not contain enough items to scroll.) 3. Items in the ListView can be dragged and there seems to be no flag to disable that behavior. I have managed to disable dragging by looking for the WM_NOTIFY $LVN_BEGINDRAG code and then issuing a MouseClick(Left), which immediately stops the drag, but this is obviously a dirty solution. Thanks! Link to comment Share on other sites More sharing options...
FlyinRiz Posted August 12, 2010 Share Posted August 12, 2010 1. Is it possible to allow a selected ListView item to be copied to the clipboard when the user presses CTRL+C?Have you tried a custom function that gets called with HotKeySet() and dumps the currently selected ListView?-Aaron Link to comment Share on other sites More sharing options...
Habland0 Posted August 12, 2010 Author Share Posted August 12, 2010 Have you tried a custom function that gets called with HotKeySet() and dumps the currently selected ListView?That'd be my last resort, but if there is a cleaner way to do it then I'm very interested to hear it. Link to comment Share on other sites More sharing options...
Habland0 Posted August 12, 2010 Author Share Posted August 12, 2010 2. Does an equivalent of $LBS_DISABLENOSCROLL exist for ListView controls? (Shows a disabled vertical scroll bar for the list box when the box does not contain enough items to scroll.) I have found a solution for this. By calling the ShowScrollBar function in user32.dll. It must be called after each ListViewItem creation, else the window's default settings (i.e. no scrollbar) are restored. It causes some minor flickering though. DllCall("user32.dll", "bool", "ShowScrollBar", "hwnd", $hwnd, "int", $SB_VERT, "int", True) DllCall("user32.dll", "bool", "EnableScrollBar", "hwnd", $hwnd, "uint", $SB_VERT, "uint", $ESB_DISABLE_BOTH) EnableScrollBar function is used to disable the scrollbar. These functions can also be accessed through the GuiScrollBars UDF. Link to comment Share on other sites More sharing options...
FlyinRiz Posted August 13, 2010 Share Posted August 13, 2010 I have found a solution for this. By calling the ShowScrollBar function in user32.dll. It must be called after each ListViewItem creation, else the window's default settings (i.e. no scrollbar) are restored. It causes some minor flickering though.One time or constant? You could try putting something in your script to only update when it's changed if it happening every loop. -Aaron 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