vb-dev
2022-11-01T16:40:36Z
As a column's width is changed, the text in the cell moves up at least one pixel when the ellipsis appears and moves down again when it disappears. Is there a way to prevent this moving of the contents of the cell?

Edit: I note also that the distance between characters changes, the text moves laterally and that this same behavior occurs in column headers.
Igor/10Tec
2022-11-02T15:54:46Z
This is a well-known problem of the GDI+ Graphics.DrawString() method used in iGrid to output cell texts. Unfortunately, we can do nothing with that. The only possible way to minimize this effect is to use another font. You can try, for example, Tahoma or Verdana and play with various font sizes - 9, 9.5, 9.75, or 10pt, trying to find the best combination.

We have an idea to replace Graphics.DrawString with the TextRenderer.DrawText call in one of the future updates of iGrid to eliminate the problem you reported. However, this may bring some incompatibility problems. For example, PrintManager will still use Graphics.DrawString because we can use only GDI+ for printing, and the text on paper may slightly differ from the text on the screen. Another compatibility problem is text drawing options: Graphics.DrawString and TextRenderer.DrawText use different format features defined with the StringFormat class and the TextFormatFlags enum respectively.

In any case, there will be also an option to choose between GDI+ and GDI for cell text rendering to select the option that works best in a particular case.
vb-dev
2022-11-02T18:33:57Z
Thank you for the explanation.