Hi,

I was exploring the possibility to implement dragging items in a
TreeView (or a ListView) control, for which I was planning to use the
MouseDown, MouseUp, etc... events. However, these are not implemented
for these controls (they are implemented only for Form, Panel,
Control, from my understanding). I tried to implement custom controls
derived from these, and override OnMouseUp, or just add the event and
the event handler in the custom control (since all these are derived
from Control), but it still does not seem to work. I also tried to
implement a custom WndProc, but this does not work either. I searched
the group, but did not find any solution not including third-party
controls.
Does anyone have any suggestion? This seems to be a pretty common
problem....

Thanks
Ivan

RE: Mouse events in CF controls (ListView, TreeView, etc...) by srhartone

srhartone
Thu Jul 17 15:34:22 CDT 2008

I never use the listview, grid control etc as I write my own but if the
listview doesn't support OnMouseDown etc you could try handle Click event
then "hack" the solution you need by detecting when the stylus was released
and position etc.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com


"batvanio@gmail.com" wrote:

> Hi,
>
> I was exploring the possibility to implement dragging items in a
> TreeView (or a ListView) control, for which I was planning to use the
> MouseDown, MouseUp, etc... events. However, these are not implemented
> for these controls (they are implemented only for Form, Panel,
> Control, from my understanding). I tried to implement custom controls
> derived from these, and override OnMouseUp, or just add the event and
> the event handler in the custom control (since all these are derived
> from Control), but it still does not seem to work. I also tried to
> implement a custom WndProc, but this does not work either. I searched
> the group, but did not find any solution not including third-party
> controls.
> Does anyone have any suggestion? This seems to be a pretty common
> problem....
>
> Thanks
> Ivan
>