listbox selection with right click

L

L Melville

Hi,

I have a listbox and need to select an item with a right click so i can
display a popup menu. any ideas how this can be done?

thanks
lee
 
L

L Melville

ok sorry I didn't explain the problem very well, what is happening now is I
left click to select an item, and then right click to show the popup, but I
want to right click to both select the popup and show the item. also for
some strange reason when I left click on an item I need to do it twice to
get the correct value (is this a bug?)

thanks
lee
 
J

John Smith

For me, using A97, either button will select a list item. If this is not so
for you, try adding :-

ListControl.Selected(ListControl.ListIndex) = True

to your MouseDown event (substituting your name for ListControl).

I have never needed to click more than once to select an item. Do you have any
code on the control that might be interfering?
 

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

Top