CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 1999
    Posts
    1

    Dblclick ListView Items

    The listview control provided with VB 6 does not have a dblclick event for list items.How can I add this event to the control (or otherways gain that functionality)?


  2. #2
    Join Date
    Jul 1999
    Location
    Prague, Czech Republic
    Posts
    263

    Re: Dblclick ListView Items

    The easiest way to do it is to do it like this I guess: In the dblclick event you check whether the selecteditem property of the listview equals Nothing. If so, exit (or do whatever pleases you) and if it is something, then you proceed the dblclick event on the selected item.

    Be carefull, I didn't check whether the doubleclick event is fired if you dblclick on the columnheaders, on the frame or on some empty space. If this all doesn't work you can try to use some API Functions to detect whether the mouse was over an listitem when doubleclicked.

    Hope that helps


    Best wishes,

    Matthias Steinbart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured