Let's say that I populate a context menu with commands from a database
table using a loop, and that these commands and their number can change
at any time. Is there a way to dynamically have events to fire when
clicking one of the items, using generic code?
For instance, let's say that these are the items on my context menu from
the database:
COMMAND1
COMMAND2
COMMAND3
Now let's say that I haven't actually coded a click event for any of
these, but want to use a generic click event so that if I click
"COMMAND3", the menuitem that's been clicked is passed to a function
containing a switch or something like that.
Is this possible?