• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Customizing appearance of NSTabView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Customizing appearance of NSTabView


  • Subject: Re: Customizing appearance of NSTabView
  • From: publiclook <email@hidden>
  • Date: Mon, 26 May 2003 20:34:41 -0400

You must always look at the super-classes of any class you want to use and especially to subclass. NSTabView is a subclass of NSView and therefore inherits all of the drawing capabilities of any view.

However, I think you will have problems doing what you want.
First, there is no obvious documented relationship between NSTabView and NSTabViewItem when it comes to drawing. That will make it hard to hook into it in non-trivial ways unless you are prepared to basically re-write it. Second, Microsoft Excel is a Carbon application that I suspect is more than half Microsoft proprietary cross platform code. I have little doubt that Microsoft hand crafted their own unique tab implementation that shares no code in common with any other Mac application.

The good news is than several free or open-source alternatives to NSTabView and NSTabViewItem exist and were used in Openstep before Apple implemented their own in Cocoa or Rhapsody.

One such example is part of MiscKit at ftp.misckit.com and probably works fine with Mac OS X. The Gnustep project probably also has an implementation. If you want to create your own mimick of Microsoft's tabs, these examples will probably show you the way.


On Monday, May 26, 2003, at 06:49 PM, Mark Alldritt wrote:

Hi,

Is anyone aware of an example of a customized NSTabView.

I want to create something very similar to the sheet tabs that appear in MS
Excel. In this case, the tabs appear in the lower left margin (to the left
of the bottom scroll bar).

I've been looking at NSTabView and NSTabViewItem, but I don't see any
drawing methods I can override. The only thing I could find was
NSTabViewItem's drawLabel, but that appears to only drag the title of a
particular tab. I cannot find anything that would allow me to alter the
overall appearance of the tab panel.

Cheers
-Mark

---------------------------------------------------------------------
Mark Alldritt Late Night Software Ltd.
Phone: 250-380-1725 333 Moss Street
FAX: 250-383-3204 Victoria, B.C.
WEB: http://www.latenightsw.com/ CANADA V8V-4M9
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Customizing appearance of NSTabView (From: Mark Alldritt <email@hidden>)

  • Prev by Date: OmniNetworking and communicating with the main thread
  • Next by Date: Re: Customizing appearance of NSTabView
  • Previous by thread: Customizing appearance of NSTabView
  • Next by thread: Re: Customizing appearance of NSTabView
  • Index(es):
    • Date
    • Thread