Re: Making a custom tabbed view control. Need suggestions.
Re: Making a custom tabbed view control. Need suggestions.
- Subject: Re: Making a custom tabbed view control. Need suggestions.
- From: John Pannell <email@hidden>
- Date: Wed, 16 Nov 2005 08:52:34 -0700
Hi Malcom-
You will be best served by creating a subclass of NSControl or
NSView, IMHO. I just completed this task for my shareware
application, and it took about three days for me to complete two
classes: an NSControl subclass for the "TabBarView" and an
NSActionCell subclass to draw the tabs in the control.
I think Shiira is a good example of how this might be done,
particularly for the cell design and drawing. I think their design
pattern is a little weak in regard to managing the relationship
between the cells and the NSTabViewItems in the managed NSTabView: I
set the cell's represented object to be the NSTabViewItem, rather
than using indices to keep track of everything, and I kept the cells
around, rather than disposing and reallocating cells each time the
view redrew.
I am a "non-expert but non-newbie" developer, and found this to be a
challenging but achievable task. I hope this helps you get headed
down the right path!
John
On Nov 16, 2005, at 8:27 AM, malcom wrote:
Hi,
I've searched for a custom tabbed view control as like in Safari.
Unfortunatly I've found only a program with a control like this.
Shiira the browser. I've searched around the sources, tried to take
the important parts but unfortunatly the code is too much legacy to
the project that is pretty impossible to use in a custom project
without killing your brain ;)
So I would to make a custom (app-indipendent) control to use in my
project (and then I would to release it under GPL license so anyone
will can use it).
I haven't maked anything like this before so this is my first time
with NSView class.
Where can I start? What's the best way? Is possible to modify the
NSTabView control (and segment) to complain a total different style or
the best way is to make a total-new control from NSView?
Thank you very much
malcom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40positivespinmedia.com
This email sent to email@hidden
_______________________________________________
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