News:

SMF - Just Installed!

Main Menu

Text Rect of a merged cell

Started by Ian Vincent, July 29, 2022, 08:17:01 AM

Previous topic - Next topic

Ian Vincent

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?

Ian Vincent

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.