Results 1 to 2 of 2

Thread: listview / popupmenu problem

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Hi,

    I have the popupmenu working for the mousedown event of a ListView but I'm encountering the following problem.. If I right-click over an item that is not already selected, it will not select it before the menu pops up. In other words, say Item 1 is currently selected and then I right click over Item 3, Item 1 remains selected..

    Windows Explorer and WinZip seem to be able to accomplish this so why can't I?

    The code I'm using is as follows:

    Code:
    Private Sub ListView_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
    
        If Button = 2 Then PopupMenu mnuSettings, vbPopupMenuRightButton
    
    End Sub
    Any help would be appreciated..

    Dan

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091
    Dummy me! I got it.. I should've put it in the MouseUp event, not MouseDown..

    Dan

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