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.
Darin,
In order for the BackColor to not paint in that section, you would need to calculate the region of the control yourself. Fortunately, there is already a method that will calculate this region based on the border style:
this.ultraGrid1.Region = DrawUtility.CreateBorderRegion(new Rectangle(Point.Empty, this.ultraGrid1.Size), this.ultraGrid1.DisplayLayout.BorderStyle);
You just have to make sure that you refresh this region each time that the grid is resized for whatever reason (i.e. docked/anchored in a form).
-Matt
Where would be the best place to do this...within a DrawFilter? If so, any guesses what phases/elements I would need to modify?