Graphics::drawRoundedRectangle (...) vs GroupComponent


#1

I'm trying to put a rounded rectangle around the border of my component, and at first tried with a group component...BUT, it seems that there is a bit of an offset from the top of the parent component, to the top of the group component box (presumably for fitting the text in).

So, then deleted the group component, and went with drawing a rounded rectange directly in the paint method, and that works fine as far as size goes. BUT,,, it doesn't look nearly as good as the lovely round edge that the group component has.  The corner is quite steppy, and appears thicker than straight edges. 

SO...what is my easiest option for getting that nice group component style, but also having the box go right to the boundaries of the parent component?

 


#2

The magic of open-source means you can see all the code, so if you want to do what GroupComponent does, just take a look in the functions that draw it, and copy what they do!