is it possible to turn off the character spacing (at the left or right end of the cell) when the columnwitdh is manually changed?
My gridboundcolumn is initialized as follows:
gbc.StyleInfo.AutoSize = false;
gbc.StyleInfo.HorizontalAlignment = GridHorizontalAlignment.Left;
gbc.StyleInfo.Trimming = System.Drawing.StringTrimming.Character;
ADAdministrator Syncfusion Team October 7, 2003 04:47 AM
Not sure if I fully understand. You could handle the ColumnResizing event and when the "reason" event argument is MouseDown set
gbc.StyleInfo.TextMargins.Left = 0;
gbc.StyleInfo.TextMargins.Right = 0;
MKMarkus KraftOctober 7, 2003 05:24 AM
the attached PDF shows the problem.
Any idea to turn the spacing behavor off?
ADAdministrator Syncfusion Team October 7, 2003 06:50 AM
Check out the GridModel.PrepareGraphics event. It lets you customize the graphics context before a grid control draws to it.
e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
You should also try SingleBitPerPixel.
Check out also the following article for some background information why GDI+ does render text differently depending on the text size: