Home - Forums-.NET - FlyGrid.Net (Windows Forms) - ColumnAlignment, cells draw inconsistent

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

ColumnAlignment, cells draw inconsistent
Link Posted: 07-Jun-2006 10:15
hm sucks
Actually, this wouldn't even have come to my attention if not a client of mine had sent me this screenshot:


See how BIGTIME off the justification is there...
Link Posted: 07-Jun-2006 11:23
See the example - used Stylist, custom drawn columns, different fonts, various data:


as I said incorrectness is possible, but +1/-1 pixel.
Please check your Stylist, csutom draw code - probably you've modified dci.cellRect in your code.
Link Posted: 07-Jun-2006 11:27
I definitely don't.

The only time I ever change the cell is here:

                if (this.Selected && cols.CurrentColumn == info.col)
                {
                    using (Pen pen = new Pen(Color.Yellow, 1))
                    {
                        Rectangle cell = info.cellRect;
                        if ((info.grid.FlyGrid.Options & GridOptions.ShowHorzLines) != 0)
                        {
                            cell.Height -= info.grid.FlyGrid.LineWidth;
                        }
                        if ((info.grid.FlyGrid.Options & GridOptions.ShowVertLines) != 0)
                        {
                            cell.Width -= info.grid.FlyGrid.LineWidth;
                        }
                        info.g.DrawRectangle(pen, cell);
                    }
                }
Link Posted: 07-Jun-2006 11:53
Try to compare with usage of this code and without.
Link Posted: 07-Jun-2006 11:56
I can't because I'm not the one experiencing this huge offset.