Re: How to fill rectangle under vertical scroller?
Re: How to fill rectangle under vertical scroller?
- Subject: Re: How to fill rectangle under vertical scroller?
- From: Quincey Morris <email@hidden>
- Date: Sun, 21 Jun 2009 21:33:14 -0700
On Jun 21, 2009, at 20:39, Graham Cox wrote:
What I meant was to create a small view that is just the size of
that small corner and use the -tile method to position it in the
corner where you want it. This is what the sample code I pointed to
is doing, albeit positioning a placard view in a different place.
FWIW, the small "gotcha" in the sample code you linked to (AFAICT,
since I never tried it) is that it places the "placard" in the area
normally occupied by a scroll bar. The corner rect that the OP wants
to draw is slightly different, in that the NSScrollView deliberately
draws white in that corner, unless it's set to not draw a background
at all. That means the linked-to code may not be quite complete -- it
may also be necessary to ensure that the custom corner view draws
above and/or after the scroll view, or else it may get painted over.
I think that's what went wrong when the OP tried to follow this code
pattern originally, although I don't think it's been confirmed. (Maybe
the OP's recent silence means that it's all working now.)
I did learn something marginally interesting from looking at the
NSScrollView behavior in IB. If you set the background color to
something other than white, it draws the clip view background in the
specified color, but still draws the corner in white. I'm hopeful that
piece of information may come in useful one of these years. :)
_______________________________________________
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