I'm working with text displayed in a grid. The grid is from Project JEDI, so it 
has WordWrap capability. When text wraps, however, row heights don't change. 
Thus, users don't see text displayed on the "new" line within a cell. I would 
like to change that--when a user adjusts the size of a column, if text wraps in 
any row then I would like the RowsHeight value for the grid to increase. When a 
user increases the width of a column enough so that no text is wrapped, then I 
would like the RowsHeight value to decrease back to where it was initially. 

Trying to figure out how to do this has been driving me crazy! I understand how 
to determine the text's width in a cell as well as the width of the cell 
itself. Thus, I know that when textWidth>cellWidth then text is going to wrap & 
row height needs to increase. I can make that happen. The problem lies in 
trying to get row heights back to their original height when text is no longer 
wrapping anywhere, i.e., getting row heights to shrink.

I understand that the property is rowsHeight--if one row height is increased 
then they all will increase. 

I may be lacking knowledge about the OnDrawColumnCell event. I can share my 
code, but I'm hoping (really hoping!) that this is such a common occurrence 
that someone out there already has an easy solution to the problem that they've 
worked out. 

Thanks, in advance -- Al
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to