|
-
August 13th, 2001, 05:50 AM
#1
Selection changed in ListView
Is there any way to handle selection changing between rows in a ListView control?
I couldn't find any proper event. I need one that corresponds to LVN_ITEMCHANGED notification or something like that.
-
August 13th, 2001, 09:34 AM
#2
Re: Selection changed in ListView
I think you can use the click event.
HTH,
Erica
-
August 14th, 2001, 12:13 AM
#3
Re: Click Event
That's what I did first. But click event is genereated only for mouse clicks, while selection can be also changed by a keydown message: vbKeyUp, vbKeyDown, vbKeyPageUp, vbKeyPageDown, vbKeyHome, vbKeyEnd.
I thought of handling KeyDown event as well, but in a KeyDown event handler I have only old selection and I have to calculate new selected item manually for each case of a key code. It is kind of silly as in Windows-generated LVN_ITEMCHANGED notification I already have all the necessary info. But I don't know how to handle Windows messages from VB...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|