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: Graham Cox <email@hidden>
- Date: Mon, 22 Jun 2009 13:39:20 +1000
On 21/06/2009, at 9:18 AM, Sumin Kim wrote:
Hi, Graham,
I think I finally got what you said. I referred your linked sample,
and implemented my source as follows.(I enclose my source for anyone
who has same problem with many thanks to this list.) I also needed
to add some code to drawRect to draw my custom view correctly.
If you find any problem from my source, please let me know.
Well, this isn't what I meant.
You've created a view that fills your entire scrollview, just to draw
some background colour in the corner. 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.
Also, you are drawing the other's view's "content" in your scroll
view. Instead, that view should be drawing its own content. This means
you have to subclass NSView to make the corner view and implement its -
drawRect method to draw whatever it is you want it to do.
None of these things are difficult. I'm afraid your solution is
incorrect.
--Graham
_______________________________________________
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