Re: Custom view with lots of subviews slows down NSScrollView scrolling
Re: Custom view with lots of subviews slows down NSScrollView scrolling
- Subject: Re: Custom view with lots of subviews slows down NSScrollView scrolling
- From: Keith Blount <email@hidden>
- Date: Fri, 11 Mar 2005 17:03:07 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Many thanks for your reply, much appreciated. Someone
else also suggesed NSCells off-list, and I am looking
into it. The main problems with this approach, however
are:
1) my margin notes are actually more than just text
views; the text views are actually contained within
another view that is used for dragging the note
around.
2) if I use a cell with a text cell instead of a text
view, I lose out on being able to hit return to create
breaks and some other benefits of text view.
An alternative I'm also looking into is replacing the
text views with NSImages whenever they are not in use
- this seems to work well, and speeds up the
scrolling. I just have to work out the details (and
try to figure why drawInRect:fromRect... is drawing my
image upside down despite everything being flipped
correctly - views and image...).
Thanks again for the help, all the best,
Keith
--- Jiva DeVoe <email@hidden> wrote:
> Sounds like a job for NSMatrix and NSCells - I seem
> to recall the docs
> say specifically they are for cases where a view has
> many subviews.
>
>
> On Mar 11, 2005, at 8:45 AM, Keith Blount wrote:
>
> > Hello,
> >
> > I have a custom view which allows the user to add
> > notes in a margin next to a text view. When the
> user
> > clicks into the view, an NSTextView is created in
> the
> > margin, which becomes a subview of my custom
> margin
> > view. (I have been careful to manage it so that
> these
> > sibling text views can never overlap.)
> >
> > The user can add as many notes as he or she likes.
> > However, I have noticed that when you add a lot of
> > notes - eg. 200 - the scroll view holding my
> custom
> > view slows down considerably when using the arrows
> to
> > scroll.
> >
> > Is there a way around this? I don't quite
> understand
> > it, as my custom view handles its own resizing, so
> the
> > scroll view only needs to worry about the size of
> my
> > custom view - it should just ignore the text view
> > subviews...
> >
> > Many thanks in advance to anyone who can point me
> in
> > the right direction,
> > Keith
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources
> site!
> > http://smallbusiness.yahoo.com/resources/
> > _______________________________________________
> > Do not post admin requests to the list. They will
> be ignored.
> > Cocoa-dev mailing list
> (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> > email@hidden
> >
> > This email sent to email@hidden
> >
>
>
__________________________________
Do you Yahoo!?
Yahoo! Sports - Sign up for Fantasy Baseball.
http://baseball.fantasysports.yahoo.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden