Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
19490 | Sep 27,2004 07:50 PM UTC | Sep 30,2004 05:04 PM UTC | WinForms | 4 |
![]() |
Tags: GridControl |
Here is how you can workaround it for now:
protected override void OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs e)
{
base.OnDrawCellDisplayText (e);
if (UseGDI)
{
// in future versions:
// GridGdiPaint.ForceDrawText = true;
// -or-
// e.Style.Trimming = System.Drawing.StringTrimming.Character;
// Workaround for now:
e.Style.Trimming = System.Drawing.StringTrimming.EllipsisCharacter; // but this draws also ellipsis at end ...
e.Cancel = GridGdiPaint.Instance.DrawText(e.Graphics, e.DisplayText, e.TextRectangle, e.Style);
}
}
This is explanation for ForceDrawText that we will add:
/// Specifies if GDI DrawText routine should always be used and text should be clipped. When you
/// set this true the performance of the GDI drawing routine will be the same as for GDIplus DrawString
/// since text needs to be clipped everytime it is drawn. If you want to force GDI DrawText on a cell
/// by cell basis you can specify style.Trimming = System.Drawing.StringTrimming.Character instead
/// and leave ForceDrawText = false.
public static bool ForceDrawText = false;
Stefan 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.
This page will automatically be redirected to the sign-in page in 10 seconds.