views:

188

answers:

1

This might be a straightforward question, even though I haven't found an easy solution to it:

I've implemented my custom UITypeEditor with the sole purpose of adding a PaintValue to bools. For the sake of the discussion, let's assume that PaintValue will either paint a checked or unchecked radiobutton.

Question 1:

Now, here's the problem: It seems like PaintValue automatically inserts a 20x13px rectangle after all paint code has completed. Naturally, a radiobutton inside a black rectangle is ugly. Can I easily instruct or override this rectagle not to be painted?

Question 2:

In this respect, is it possible to paint on top of the propertygrid's native look - meaning could I paint something in order to obscure (part of) the black line separating two grid cells vertically? The purpose of doing this would be to indicate that two values were linked, like constrained width/height to an aspect ratio.

+2  A: 

I don't know about the painting, but on point 2 - maybe add a glyph via IPropertyValueUIService - there's an example on codeproject.

Marc Gravell
Interesting link. I was hoping for a simpler cleaner answer though. It's not a central feature of the application so I'd rather keep the codebase clean than to clutter it with lots of stuff just to draw a few lines.
Pedery