generative modeling for Rhino
As you mentioned in several previous posts and in the SDK, we need to override several attributes in order to create custom layouts for new components by using CreateAttributes.
I would have several questions concerning this topic:
For the moment I try to use examples given in the SDK such as
Bounds = new RectangleF(Pivot, new SizeF(width, height));
textRectangle.Height = 20;
There is no utility as far as I know that can convert a drawing into GDI+ code.
I can add an example on how to modify component attributes, but it's quite complicated so it will be a lot of work (i.e. I can't do it overnight).
If there are topics that ought to be in the docs but aren't, I'll do my best to add them over time.
There are very few objects in Grasshopper that are derived from GH_Component and which override the display. It was very difficult in 0.8.0066 to make it work. I wrote a few utility functions for it which will be available in 0.9 (if everything goes fine released later today). I attached the code for Gradient Attributes (minus all the mouse event handlers). Maybe it will help out a little bit.
Thank you for the code David, it really helps!
What I am trying to achieve in order to experiment layout edition is something very similar to the gradient component, but instead to have this color gradient window, I would like to display a list of strings, with one on these strings highlighted (a ListBox without mouse events in other words).
I will try to find some GDI+ manuals to do it.