repost... Listbox

J

Jim C.

I've added code to a listbox's mousedown event to trigger
a rightclick shourtcut menu. I Most windows applications,
when you right click the menu appears AND the item is
selected. I have been unable to duplicate this. here is a
copy of the code i'm working with...
***********************************************************

Private Sub lbTakeoff_Mouseup(ByVal Button As Integer,
ByVal Shift As Integer, ByVal X As Single, ByVal Y As
Single)

If Button = 2 Then
CommandBars("rclick").ShowPopup
End If

End Sub

***********************************************************
thanks...
 
J

jim c.

code works great... i had to change Clng to ((y-10)/10) to
account for the header...

only one problem, my procedures require listindex to be
selected. right now they appear to only be activated
(just a rectangle) no blue highlight...

what you gave me though really helps alot... thankyou
 
J

jim c.

should have told you listbox is multiselect... when
changed to single, your code works perfect
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top