Re: NSTextAttachmentCell redraw with new size
Re: NSTextAttachmentCell redraw with new size
- Subject: Re: NSTextAttachmentCell redraw with new size
- From: Douglas Davidson <email@hidden>
- Date: Wed, 11 Sep 2002 13:49:31 -0700
On Wednesday, September 11, 2002, at 01:23 PM, Mark's Studio wrote:
I have a custom NSTextAttachmentCell that have a normal and a expanded
cellSize,
it's only the height that changes.
my problem is that when i click the cell the new cellSize is not used,
only if i resize the textView or type into it, the cell is drawn with
the correct size.
so what do i call after the cell is clicked to force the textview to
redraw the cell with the new size?
You probably will need to force re-layout of the affected text. You
can simply tell the layout manager explicitly to invalidate layout for
an appropriate range. A somewhat cruder alternative might be to remove
your attachment from the text storage and then re-insert it.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.