Re: NSTextAttachmentCell redraw with new size
Re: NSTextAttachmentCell redraw with new size
- Subject: Re: NSTextAttachmentCell redraw with new size
- From: "Mark's Studio" <email@hidden>
- Date: Wed, 11 Sep 2002 23:02:15 +0200
Thanks
I just found another easy way to force the textView to update.
[self insertText: nil];
On onsdag, sep 11, 2002, at 22:49 Europe/Copenhagen, Douglas Davidson
wrote:
>
>
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
>
>
Peter Mark
Mark's Recording Studio A/S
Faelledvej 19 b DK2200 N
Copenhagen Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
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.