UITabActionCell

Here is the latest version of the Public Domain UITabCell Palette.

I touched this up a little so that the dark gray view is no longer needed and the cell itself is a subclass of an ActionCell so that it can be used with actions and tags.  I think it makes a more useable palette now.  What I would like to see is the edges of the tab be drawn by postscript so that we could make really huge fat tabs.  But it's probably best like it currently is.  

I also implemented the calcSize method so that it knows the proper size of the cell.

Thanks to all who have created this before me!
---
Laboratoire de Neuro-Heuristique           Work: ++41 021 692.5516
Institut de Physiologie                                Fax:  ++41 021 692.5505
Rue du Bugnon, 7                                       Sean.Hill@iphysiol.unil.ch
CH-1005 Lausanne  SWITZERLAND

-----------------------------------------------------------------

Several weeks ago, a TabView much like the one featured in EOF's new Interface Builder was posted. Here's a palette built around the same code, compiled for both black and white hardware.

Only one change was made to accommodate IB. TabSelectionCell adds a test for the kind of superview it is being asked to draw in -- normally this is a Matrix but in the IB editor, the cell is asked to draw in some other kind of View.

You can now drag a Matrix of these Cells and, in conjunction with a palette like TTools from NeXTanswers, build a switching file-folder like UI completely within IB.

Many thanks to the original poster!

Regards,
Mark R. Onyschuk

---
M. Onyschuk and Associates Inc.		389 Leslie St. Toronto Canada, M4M 3E3
NEXTSTEP SOFTWARE DEVELOPMENT		phone +1.416.462.3954
-----------------------------------------------------------------

After seeing Jean-Marie's new addition to Interface Builder, I just couldn't help wanting those cool tabs for my very own! Since I don't have IB source :-), I just had to figure it out for myself.

There are two caveats (bugs?):

1) If you put these into a ScrollView, sometimes the little tab ends won't redraw themselves properly when scrolled after being clicked on. Since you probably shouldn't be putting a control like this into a ScrollView, this really shouldn't present a problem (although if someone want's to send me a bug fix, that'd be appreciated).

2) The first and last tab cells are 7 pixels (half a tab image width) shorter than the rest of the cells. This is due to a drawing issue with drawing inside the matrix. If the images on the first and last cell aren't shifted in, they get clipped by the matrix and don't look very good. If your cell's are relatively large, this really isn't very noticeable. The real way to fix this is to get in there, determine how many cells there are, and distribute this difference among all of them. Again, anyone wanting to send me this code should fell very free to do so.

Have fun,

Bill Edney
bedney@firstsoft.com

P.S. This code is totally free from any licenses or warranties or anything. In other words, use it however you want but don't blame me if it hoses something up!
----------------------------------