C# Grasshopper how to handle with combobox

I just want to ask about how to handle with combobox in grasshopper

I know that’s depends on Render,layout and RespondToMouseDown

but how I can draw combobox by example and custom it into Grashopper component

any ideas?

Hi and welcome to grasshopper.

Please read this: How to ask effective questions

Can you be more specific?

sample

do you see this combobox in area A? what’s the way to do it in grasshopper
I understand the idea of layout , Render and RespondToMouseDown
but I still can’t handle with combobox as this example
so what’s the steps ?

I do not recommend putting winforms controls on your attributes. Winforms doesn’t like zooming and also messes with mouse events and draw order. What you can do is draw something that looks like a combobox, and then when you detect a mouseclick on that area, you either temporarily add a combobox to the canvas or you show a window. The slider object does this with a textbox if you double click the slider region.

Thnx David, already I did something like as combobox draw something look like as combobox , using ToolStripMenuItem and do my actions in RespondToMouseDown but i prefer if there way to do somthing better to custmize the component with wpf like as in Dynamo to avoid spend a lot of time