I have an NSTableView that has rows of variable height, depending on the amount of text in a specific column. This works.

If I resize the column, the row height adjusts correctly as the text is rewrapped.

If I edit the contents of a cell, the field editor appears having the expected size. It has the height of the row and consequently shows all the text.

If I resize the column while the field editor is active, the field editor resizes to fit the column width and row height, which varies as the text is rewrapped to fit the new column width.

This is all well and good.

However, if I change the edited text sufficiently that the number of lines changes, the row height changes correctly, but the size of the field editor does not change. For instance, if the text requires two lines, and I delete one line, the row height changes, but the field editor is still the height of two lines. If I add a line, the row height changes to 3 lines, but the field editor is still 2 lines.

Under these circumstances, the numerical dimensions of the frame of the field editor change, but the size of the focus ring does not change, and rectangle of text that is visible does not change. So changing the field editor's frame does not help.

Resizing the column makes everything good again. So there must be some property of the field editor that can be modified so that it follows the row height. Presumably this could be changed without resizing the column. But hours of search and experimentation have been in vain.


--
Timothy Larkin
Abstract Tools
Caroline, NY

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to