EGrid Forums

EGrid Pro => EGrid Pro => Topic started by: Ian Vincent on July 29, 2022, 08:17:01 AM

Title: Text Rect of a merged cell
Post by: Ian Vincent on July 29, 2022, 08:17:01 AM
I want to automatically set the row height based on cell contents which may or may not be wrapped.
Is there any way to get the size of the bounding rectangle for the cell text?
Title: Re: Text Rect of a merged cell
Post by: Ian Vincent on August 05, 2022, 09:04:18 AM
It turns out to be easier than I thought.

Just use DrawText with the Cell Rect and %DT_CALCRECT flag to calculate the wrapped text height.

Use that to set the new row height.