C# Winforms ListView DoubleClick event anywhere
I'm trying to get the following functionality in my winform:
I开发者_如何学Python need so that every time a someone double clicks inside my ListView, something will happen, but the event seems to only trigger when double clicking on a row containing an item in the ListView instead of anywhere in the ListView (including the empty area below all the items).
What event will fire when double clicking anywhere in the ListView?
Thanks
you can used the ListView1_MouseDown event rather than click
You can probably achieve the required behavior by inheriting from ListView, and overriding the method OnNotifyMessage().
In that method, you'll have to intercept the correct message: WM_LBUTTONDBLCLK (or similar).
That's not going to be the prettiest code you've ever written, but should get you the results.
精彩评论