Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
16735 | Jul 22,2004 05:01 PM UTC | Jul 23,2004 09:10 AM UTC | WinForms | 2 |
![]() |
Tags: GridControl |
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style) { Rectangle rect = new Rectangle(clientRectangle.X, clientRectangle.Y, clientRectangle.Width + this.Model.ButtonBarSize.Width, clientRectangle.Height); int width = (int) g.MeasureString(style.Text, style.GdipFont).Width; if(width < rect.Width) { style.ShowButtons = GridShowButtons.Hide; GridStaticCellRenderer.DrawText(g, style.Text, style.GdipFont, clientRectangle, style, style.TextColor, false); } else base.OnDraw (g, clientRectangle, rowIndex, colIndex, style); }
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.