Hello,
I'm using TDPFUITableView, and I want to create dynamic height for each TTableItem.
I need to draw the cell by using OnDrawCell, and I declare in the objects :
With NumberOfLines and sizeToFit, the text is OK, but it crop, because the height of the parent (TTableItem ?) has not the good size.
Is there a way to do that ? I think the size of the cell should be fill before the OnDrawCell, but I don't know how to calculate the height of my text, and my TDPFLabel is declare in the onDrawCell, not in the onGetRownHeight...
thank you for your help
Last edit: Pierre Moati 2013-10-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm using TDPFUITableView, and I want to create dynamic height for each TTableItem.
I need to draw the cell by using OnDrawCell, and I declare in the objects :
With NumberOfLines and sizeToFit, the text is OK, but it crop, because the height of the parent (TTableItem ?) has not the good size.
Is there a way to do that ? I think the size of the cell should be fill before the OnDrawCell, but I don't know how to calculate the height of my text, and my TDPFLabel is declare in the onDrawCell, not in the onGetRownHeight...
thank you for your help
Last edit: Pierre Moati 2013-10-18
Hi Pierre
Download last source [code] and see TableViewAutoHeight demo
regards
Related
Code: code
Thank you.
I process something similar by my way (with a lot of difficulty), but your code is more nice than mine :)