I'm trying to make a QTF table, and it's needed to have all rows with exactly same row height, without wrapping Strings in the cells but truncating and probably adding an ellipsis character. I found DrawTextEllipsis() routine but not sure how could I use it in QTF.
Any ideas?
You cannot use DrawTextEllipsis there.
This is though one. If I really needed this, I would probably:
- create temporary RichText just for testing with the cell of correct width and with intended font
- measure the height of text (with GetHeight)
- put the inteded text into this cell
- keep shortening the text until the height matches (you can use binary search to make this log(len(text)))
- use this shortened text in the real table.
Not very elegant, but not that hard to implement and should work...