From: Shaun on 10 Feb 2006 08:24 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
From: Rick Spiewak on 10 Feb 2006 10:06 Try using OneClick activation, and the ItemActivated event instead of SelectedIndexChanged "Shaun" <Shaun(a)discussions.microsoft.com> wrote in message news:5214004A-1E33-44C3-9B45-9F3FCC50EA7F(a)microsoft.com... > 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
From: Alex Yakhnin [MVP] on 10 Feb 2006 10:18 Take a look at my blog for samples on how to subclass the ListView control: http://blog.opennetcf.org/ayakhnin/PermaLink.aspx?guid=4d82068f-0b25-4b01-825d-4dffb0335817 -- Alex Yakhnin, .NET CF MVP www.intelliprog.com | www.opennetcf.org "Shaun" wrote: > 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
From: Shaun on 10 Feb 2006 12:00 Rick, That worked! I thought I tried that, but I guess I didn't. Thank you very much. Shaun "Rick Spiewak" wrote: > Try using OneClick activation, and the ItemActivated event instead of > SelectedIndexChanged > > "Shaun" <Shaun(a)discussions.microsoft.com> wrote in message > news:5214004A-1E33-44C3-9B45-9F3FCC50EA7F(a)microsoft.com... > > 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 > > >
|
Pages: 1 Prev: Install .net Framework 2.0.50727 Next: lineGetGeneralInfo |