Re: NSView & border
Re: NSView & border
- Subject: Re: NSView & border
- From: Ricky Sharp <email@hidden>
- Date: Thu, 11 Nov 2004 06:19:31 -0600
On Thursday, November 11, 2004, at 04:03AM, Don Willems <email@hidden> wrote:
>This has been asked before, but I couldn't find an answer.
>NSView defines constants for borders: NSBezelBorder, NSGrooveBorder,
>NSLineBorder, and NSNoBorder. But there does not seem to be any method
>to set the border.
NSView is just the home for those contants. There is a setBorderType: method, but that's only available with NSBox and NSScrollView.
>I' have a custom NSTextView (with subviews) in urgent need of a border,
>can someone help me?
>I've tried drawing the border myself in the drawRect method, but it
>doesn't seem to get drawn, the subviews are probably drawn on top of
>it.
Would it be possible for you to put your NSTextView within an NSBox or NSScrollView?
If you must manually draw things, you'd need to make sure your NSTextView subviews are inset properly so as to not overlap the border's area. But how you'd mimic the drawing that NSBox/NSScrollView does, I do not know.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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