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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to