|
-
Nov 17th, 2017, 08:29 AM
#1
[RESOLVED] Manually close a menustrip dropdown
Hey all,
I have a menu strip with a bunch of nested drop down items and before the user is allowed to click any of the children, I need to run a validation routine. If that routine fails, the click should be aborted.
To do this I am trying to handle the MenuStrip.ItemClick event, and when it fires I call the validation method and if it fails I want to simply close the drop down to prevent any children from being clicked.
Does any one know how to manually close a menustrip drop down? Or suggest another way? I don't want to have to validate in the click event for each child... there are too many.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Nov 17th, 2017, 08:37 AM
#2
Re: Manually close a menustrip dropdown
blarg!!!
Some times all one needs to do is ask a question to get the answer.
Solution....
Iterate the MenuStrip items collection and call the HideDropDown method for each.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|