We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid rowheights in AutoScaled forms

Thread ID:

Created:

Updated:

Platform:

Replies:

9261 Dec 11,2003 04:56 PM UTC Dec 11,2003 10:01 PM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 11, 2003 04:56 PM UTC

Hi, When Large fonts are enabled in the Windows(Control panel -> Display -> Settings -> Advanced -> General -> Font size: Large fonts (120 dpi)) and the form AutoScale is true, grid control is not displaying the cell text properly. 1. Set the windows to use large fonts. 2. Run the DataboundSortByDisplayOrder (or any other grid sample). 3. Notice that text is chopped off at the abottom of (y, g, q etc.). How Can I make my grid auto scale properly? Does the grid adjust row heights automagically by looking at the current font settings? If not can you please suggest a workaround. I am using 1.6.1.8/vs.net 2003/xp/win2k. thanks, - Reddy

Administrator [Syncfusion]
Replied On December 11, 2003 10:01 PM UTC

The grid defaults the row height to 17. It is not set based on the default font. But I think you can use code like this to set the default row height based on font height.
Font f = this.gridDataBoundGrid1.BaseStylesMap["Standard"].StyleInfo.GdipFont;
using(Graphics g = this.gridDataBoundGrid1.CreateGraphics())
{
	float height = 5 + f.GetHeight(g.DpiY);
	this.gridDataBoundGrid1.DefaultRowHeight = (int) height;
}

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;