Re: create custom control same as multiple monitor control that manages monitors windows
Re: create custom control same as multiple monitor control that manages monitors windows
- Subject: Re: create custom control same as multiple monitor control that manages monitors windows
- From: Paul Bruneau <email@hidden>
- Date: Mon, 12 Jan 2009 11:17:45 -0500
On Jan 12, 2009, at 10:54 AM, I. Savant wrote:
On Mon, Jan 12, 2009 at 10:48 AM, Paul Bruneau
<email@hidden> wrote:
The way I did a similar thing (and I think this is the standard
way) was to
create a custom NSView subclass to draw the control.
Well ... the *standard* way is to use the control/cell system, but
the *easier* way is sometimes to simply use a custom NSView subclass
as you said. :-)
http://developer.apple.com/documentation/Cocoa/Conceptual/ControlCell/ControlCell.html
NSControl gives you a lot of freebies that you'd have to implement
yourself (especially support for things such as accessibility
features, etc.) but at the cost of having to get your hands dirtier
with creating a custom cell. It's a bit more involved but usually more
appropriate if it's an interactive UI widget (ie, a "control" and not
simply a "view").
You know, it's funny, when I first started my first Cocoa project as a
total Cocoa newb I wanted to use controls/cells for my rectangles but
I was strongly advised against it by very highly regarded Cocoa gurus.
Maybe it's because my project could have hundreds of rectangles in a
single view and the gurus were concerned about all the overhead?
_______________________________________________
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