In my C# Winforms application, I have a tablelayoutpanel which will contain listboxes from anywhere between 2 to 64. A user can double-click any items inside the Listbox, which then transfers the information of the item to a modaless window that was already opened.
My question is the following:
-
How do I know which listbox the event has been called from?
-
Is there a way to figure out which row/column the listbox is inside the tablelayoutpanel?
That one I’m not so sure of as I haven’t worked much with that class. You can certainly get the bounding rectangle of the
ListBoxwithin its parent container, but I took a glance at the documentation forTableLayoutPaneland I didn’t see anything obvious (i.e., something like aColumnsproperty).