.Net Grid does not seem to respect ClearType when rendering text.
At design time my .Net grid is inheriting its font from the Form - Segeo UI 8.25pt - but does not render using ClearType at run time. I'm not even sure it is using the inherited font at all as it looks more like MS Sans Serif (which i'm not sure is a ClearType font anyway)
How can I get my grid to use the font inherited from the form?
-
Dear Joshua,
The grid enables to specify fonts for different elements (rows, columns) on various hierarchical levels. If you want to use inherited font, the following snippet will demonstrate how to do it:
public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent();
//...
grid.Headers[0].Appearance.RowFont = Font;
grid.Headers[0].Appearance.ColumnCaptionFont = Font;
}
}Best regards,
Dapfor
0 -
Thank you for the quick repsonse. While this worked, it is still not rendering the font using ClearType. In the attached picture you can see the tab control heading renders "Dapfor Portfolio" in ClearType but the dapfor grid it contains is not respecting ClearType. Is there something I can change in one of the Paint event handlers (like setting the TextRenderingHint) to force the grid to use ClearType?
Thanks
cleartype.png0 -
Dear Joshua,
We can't reproduce the bug. On our side the grid paints text with ClearType fonts as expected. Could you wrire a small application demonstrating your problem?
Best regards,
Dapfor
cleartype_fonts.png0
Please sign in to leave a comment.
Comments
3 comments