Results 1 to 2 of 2

Thread: Listview / Context menu Q.

  1. #1

    Thread Starter
    Hyperactive Member SjR's Avatar
    Join Date
    Jul 2001
    Location
    Birmingham, UK
    Posts
    336

    Question Listview / Context menu Q.

    Good Morning
    Happy Christmas
    + New Year
    Good will to all men (and women)


    I have a listview with x number of items in the 'details' style. I also have 2 context menus - neither associated with the listview at design time.

    I want to associate one of the context menus at runtime with the listview depending on whether an item in the list was right clicked OR the space at the bottom of the listview was right clicked.

    The bit I can't get to work is detecting whether an item is highlighted or not when the right mouse button is clicked.


    Secondly, how can I detect a double click in the empty space of the listview - the doubleclick event only runs when an item is double clicked and not when the empty space is double clicked.

    Thanks for any responses..

    SjR
    Another satisfied customer

  2. #2
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    If ListView1.SelectedItems.Count() > 0 Then 'something has to be highlighted

    I don't think there is an easy way with the doubleclick though....

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