I am using a grid with a Rounded4Thick border style on a dark background. My requirements call for the background inside the border to be white, so I am setting the BackColor to Color.White. The result leaves the small white spots in the area outside the border but inside the grid's rectangle...see the attachment.
Does anyone know of a way to set the color for that area...or at least set it to transparent?
Thanks,
Darin
P.S. Sorry for the ugly image...tried a few things to make it better but had no luck.
That was the issue...I was setting the BorderStyle in InitializeLayout...when I fixed the order it worked fine.
Thanks for the help,
There shouldn't be any other property, but you should definitely be using that code after you set the BorderStyle on the grid. If you are definitely setting it after you set the borders to rounded, then I'm not sure what the problem is since this worked for me. It doesn't have to be before the control painted, since setting the Region should update it.
-Matt
OK...I tried that and I still get the white corners. I did step though to insure that it was firing before the control painted. Is there another property I have to set somewhere to specify what color I want the corners to be?
No, this is not done with a draw filter, the Region property is on the Control class itself. You would use exactly the code that I posted, likely in the constructor and then in the SizeChanged event handler of the grid.
Where would be the best place to do this...within a DrawFilter? If so, any guesses what phases/elements I would need to modify?