Hi,
I have a context menu that copies the selected items in a listbox to
the clipboard.
I want to use it on two listboxes and can't see how to detect the
parent control in the event handler.
i.e.
Something along the lines of:
IEnumerator en = ((ListBox)sender).SelectedItems.GetEnumerator();
(except that sender is a toostripmenuitem)
thanks
Bob
bob - 30 Sep 2007 20:46 GMT
Hi,
In case anybody else strikes something similar.
Workaround was to declare a class level Listbox.
Use the selectedindex changed events of the form listboxes to point
it at the 'current' list box.
Refer to the declared variable in the context menu event handler.
Bob
>Hi,
>I have a context menu that copies the selected items in a listbox to
[quoted text clipped - 7 lines]
>thanks
>Bob