jrvbdeveloper
Member
- Joined
- Jul 15, 2007
- Messages
- 17
- Programming Experience
- Beginner
Hi,
I am creating menu links dynamically. I just want to know what the best way is to identify wihch link was clicked?
For example, a toolbar button has dynamically added menu items "Red","Blue","Yellow","Green." Currently, the way I solve the problem is that when I'm creating the menu items, I set the Tag property (ie to red,blue,yellow,green). I add an eventhandler to handle the dropdownmenuitems clicked event, and in this event handler I use the tag property to figure out what I need to do. Is there a better way?
Thanks in advance!
I am creating menu links dynamically. I just want to know what the best way is to identify wihch link was clicked?
For example, a toolbar button has dynamically added menu items "Red","Blue","Yellow","Green." Currently, the way I solve the problem is that when I'm creating the menu items, I set the Tag property (ie to red,blue,yellow,green). I add an eventhandler to handle the dropdownmenuitems clicked event, and in this event handler I use the tag property to figure out what I need to do. Is there a better way?
Thanks in advance!