Hi, I have a DataGridView. In some cells, I write with Drawstring in the event Paint.
The problem is that I don't know how to manage the horizontal scroll bar, when moving from the right side to the left side.
I tried
Bitmap flag = new Bitmap(celltopaint.Width, celltopaint.Height);
Rectangle rect = new Rectangle(0, 0, celltopaint.Width, celltopaint.Height);
Graphics flagGraphics = Graphics.FromImage(flag);
flagGraphics.DrawString(("Example", gridd.ColumnHeadersDefaultCellStyle.Font, new SolidBrush(gridd.ColumnHeadersDefaultCellStyle.ForeColor), rect, format);
but this comes out in bold, I don't know why (the same font and brush in the gridview is not in bold)

and I try
Bitmap b = new Bitmap(Width, Height);
gridd.DrawToBitmap(b, celltopaint);
but the bitmap b result without the string.

Any suggestion?Than you.