Field Editor Size in NSTableView
Field Editor Size in NSTableView
- Subject: Field Editor Size in NSTableView
- From: Timothy Larkin <email@hidden>
- Date: Wed, 27 May 2009 14:15:02 -0400
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 (email@hidden)
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:
This email sent to email@hidden