ListView MouseDown Event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to add the following functionality:

- I have a ListView with a few columns that is in Detail view with single
row select enabled. I have added the ability for the user to tap on one of
the rows in the ListView to open up a new Form containing the details of the
item that was tapped. I also need to have a ContextMenu to popup when the
user performs a tap & hold on one of the rows.

I have implemented the SelectedIndexChanged handler to detect when the user
selects a row and open up a Form with the appropriate information. I have
also ascribed a ContextMenu to the ListView. The ContextMenu appears fine if
I tap & hold in the whitespace area of the ListView, however when I perform a
tap & hold on one of the rows, the SelectedIndexChanged routine fires before
the tap & hold support. I have tried various methods to get around this,
including changing the Activation method for row selection/activation, etc.
I then tried to author my own custom ListView control that captured the
MouseDown event, however this event never seems to fire no matter where I tap
the stylus.

Can anyone please help me out with this issue and possibly point me in the
direction of a code example or something similar. Any help with this issue
would be greatly appreciated.

Thank you very much,
Shaun
 
Try using OneClick activation, and the ItemActivated event instead of
SelectedIndexChanged
 
Rick,

That worked! I thought I tried that, but I guess I didn't. Thank you very
much.

Shaun
 
Back
Top