Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Figuring out height of text in UltraTree with CellWrapText=true
posted

Hi,

I've determined that the UltraTree (with FreeForm ViewStyle) does not have a method for automatically sizing the node height to fit wrapped text if CellWrapText=true.  I need the cell text to wrap though, so I'm trying to calculate the height of the wrapped text so I can set PreferredCellSize appropriately to show the entire text.  Is there a reliable way to do this?  I've tried using TextRenderer.MeasureText() with different combinations of TextFormatFlags and Graphics.MeasureString(), but neither one has given me reliably accurate results.  Is there a way to get the number of wrapped lines directly from the cell/column object?  If not, what would you recommend I use for measuring the text height?

Thanks,

Cassio

Parents
  • 48586
    posted

    Hello,

     

    Could you please let me know the exactly version of Infragistics that you are using. Also is it possible to post a simple sample that demonstrates your issue. I want to see how many  lines of text you need to display in a single node.

     

    I ma waiting for your feedback.

Reply Children