Add a click event to a listbox filled with objects in code

Posted by djerry on Stack Overflow See other posts from Stack Overflow or by djerry
Published on 2010-05-03T11:56:06Z Indexed on 2010/05/03 12:08 UTC
Read the original article Hit count: 308

Filed under:
|
|

Hey guys,

I'm trying to sho a contextmenu on right-click on an item in a listbox. So i'm binding a list of "Users" to my listbox. Then i'm a bit lost. I thought i could foreach the list and add a mouserightdown event on the listboxitems, but i can't figure out how.

Is this a good way, or does anyone know a better way of accomplishing what i want.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about c#

Related posts about event