NSCollectionView resizing
NSCollectionView resizing
- Subject: NSCollectionView resizing
- From: Martin Redington <email@hidden>
- Date: Fri, 16 Nov 2007 13:01:17 +0000
I'm trying to implement a palette like the one for the Library in
IB3.0 - I think I spotted the same control in another app as well.
I took a quick look at the IB3.0 implementation (with F-Script
Anywhere), and it looks like a direct subclass of NSView.
I decided to try building my implementation on NSCollectionView.
I have a custom NSView that I use with my NSCollectionViewItems. This
view draws a one pixel border on it's right and bottom sides, so that
I end up with a one pixel grid. Right now that's all it draws.
When the NSCollectionView is resized, and enough space for another
column is present, the NSCollectionView rearranges its matrix. It
seems to animate the rearrangement. For example, in the ascii art
below, cell 3 "flies" up to join the end of the first row.
________________
| | |
| 1 | 2 |
|_______|______|
| |
| 3 |
| |
---------
I'm having two problems with this.
As my views are only drawing the right and bottom border, they look
"wrong" when flying. I'd like to have custom drawing code for the
"flying" image, so that I can draw borders all the way around.
Occasionally, especially when I have large numbers of items (where
large = 12), the views do not seem to refresh correctly, so that one
or two cells end up with spurious lines on them (from borders of
flying items that have not been painted over).
If I can't easily fix these issues, turning the flying animation off
would be an acceptable solution for now.
Any help appreciated.
cheers,
Martin
_______________________________________________
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