Hi,
I need to add multiline text to the fixed-sized header and draw ellipsis if the text does not fit (similar problem as here: http://forums.infragistics.com/forums/t/19546.aspx). How can I achieve this?
I added a table to the header (I need to layout multiple fields) and set fixed table cell height. If the text is too large you cannot see all of it (it's simply truncated).
Here is a code sample:
ISectionHeader header = section.AddHeader(); ITable headerTable = header.AddTable(0, 0); ITableRow row = headerTable.AddRow(); ITableCell cell = row.AddCell(); cell.Height = new FixedHeight(20); cell.AddText().AddContent("Some \n multiline \n text \n here");
I don't need to necessarily use the table here, I just need some fixed height element to draw ellipsis if the text does not fit in it.
Thanks.
I don't think that there is any built-in functionality to accomplish this. You could certainly measure the text yourself and adjust the text accordingly if it won't fit in the width. There was a suggestion on how to accomplish this in this thread.
-Matt