algorithmic modeling for Rhino
Hi Everyone,
I am probably missing something very simple here:
I am overriding the GH_Param method AppendMenuItems to add my own custom menu items to my own GH_Param.
However when those menu items popup I do not know how to trigger a close event when the user clicks outside the menu item onto the Grasshopper canvas.
How do I trigger an event when a user clicks outside the menu?
Many thanks!
Tags:
That should happen automatically. What sort of menu items are you adding?
Hi David,
Do you have anymore input on this? I'm basically stuck until I work this out. Thanks!
You posted an abstract class, so I couldn't test with your code.
However made another parameter that overrides the menu and shows a list of cities. Maybe you can use this as a basis for your parameters?
David Many thanks its working very nicely.
How would I change the code so that I can select multiple items?
Do I need to override Menu_CustomMultiValueItem?
Thanks
Hi David,
I created my own code based of yours for multiple selection and have posted it here for all to see:
That's a problem because a standard menu will close as soon as you click on it once. To keep a menu open after a single click you'll need to actually insert a custom control into the menu (like I do with object names and colours and a few other things here and there).
However I'd say this is something that should not be a menu at this stage, it is becoming too complicated. You could for example use the menu to display a proper Form in which you can do all sorts of tricky UI stuff, like have city search, or maybe pick cities off of a map, or...
You're right thanks David.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by