Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Menustrip dropdownitemclicked

Status
Not open for further replies.

ty1122

Programmer
Jan 20, 2005
16
US
For example I have a menustrip item lets call it A
then i have like 100 menustrip items under A.
Under each of these items there are also 100 items.
I want to get a single click event that handles any click event under A (so that i don't have to create 10000 of them).
It is possible to do A_dropdownitemclicked to get the items directly under A but I couldn't go any deeper to those 10000 items under the sub-A items.
Any hints? (maybe it is a stupid idea to do such a huge menu?) Thanks
 
You could produce a single dropdownitemclicked handler and then use addhandler in a loop when the program starts, to add the handlers. You would then need to use the sender parameter to determine which dropdownitem was clicked.

But do you really need 10000 items in a menu?


Hope this helps.

[vampire][bat]
 
It's just for practice. Thanks for your tips i got it now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top