Devils Ears or Rounded corners

Topics: User Forum
Oct 4, 2006 at 4:43 AM
Maybe its late on my end, but I have a GradientNavigationButton sitting on a dark panel. If I round the top corners (12), the right angle area in the corners, unpainted area, shows up as white. Since the button is sitting on a dark area, the effect is, for lack of a better term devil's ears. I could not find a background property to set to transparent, to allow the dark color to comes through where the control has been rounded off. Please Advise. Thanks
Coordinator
Oct 4, 2006 at 4:17 PM
Generally if you see stray artifacts around rounded corners changing the corner radius number up or down by 1 will clean it up. If that doesn’t work you can set the AntiAlias property to true. There is a slight performance penalty if you have many buttons on a screen and set all their AntiAlias properties to true.

Thanks,
Scorn
Oct 6, 2006 at 2:46 AM
I have sent Scorn the picture of the screen shot, but to let everyone know...

As with windows forms, things are in layers. I have the button on top of dark blue panel. Below the panel, rests another panel with grey. The ears I see (where the button was rounded off) is the color grey. The assumption would be that those ears, so to speak, would be blue and the button would blend in with the lower panel. But the ears are grey...hence picking up the lowest most panel. Everthing is transparent, except for the lowest most panel.
Coordinator
Oct 6, 2006 at 10:44 PM
The problem stems from placing a control on top of another control that is not a container. In this case placing a GradientButton control on top of a GradientCaption control. Because the GradientCaption is not a container control the GradientButton looks to its parent to decide what color to make the transparent background. The parent is not the GradientCaption but whatever control they are both contained in. It just appears that GradientButton is contained in the other because it is on top.

At an earlier point I had the GradientCaption based on a container control. This seemed inefficient so I based it off a regular control. I’ve looked at making the transparent areas truly transparent but there is a bug (IMHO) in .NET that results in the transparent area being transparent all the way to the desktop. There are ways around this but I don’t care for all the unsafe API calls it takes.

I will see about what can be done in the next version that we starting now. Sorry for the issue. :-)

Thanks,
Scorn