Grasshopper

algorithmic modeling for Rhino

Attached is the code I use to define the "selected index" for when I click an item under Menu_AppendItem(...);

My question is -- how do I add a checkbox to the selected item?

Like this: 

Views: 671

Replies to This Discussion

When you populate the menu you have to assign check marks. If you use the Menu_Appendxxx() methods provided by Grasshopper there's an overload which allows you to immediately set the checkmark for each item.

--

David Rutten

david@mcneel.com

You could put the _index=i in the field for check:

Menu_AppendItem(menu, _valueList.FirstList[i], new EventHandler(), _index==i, true);

--

David Rutten

david@mcneel.com

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service