ftp.nice.ch/Attic/openStep/developer/resources/MiscKit.2.0.5.s.gnutar.gz#/MiscKit2/Temp/TabbedViews/MiscTabMatrixPalette1/MiscTabMatrixPalette.m

This is MiscTabMatrixPalette.m in view mode; [Download] [Up]

// Copyright (C) 19956
// Use is governed by the MiscKit license

#import "MiscTabMatrixPalette.h"
#import "MiscTabActionCell.subproj/MiscTabActionCell.h"

@implementation  MiscTabMatrixPalette

- (void)finishInstantiate
{
    NSRect              frameRect;
    NSMatrix            *newMatrix;
    MiscTabActionCell	*prototype;
    
    prototype =
      [[MiscTabActionCell allocWithZone:[self zone]] initTextCell:@"Folder Tab"];
    frameRect = [matrix frame];

    
   newMatrix =
     [[NSMatrix allocWithZone:[self zone]] initWithFrame:frameRect mode:NSRadioModeMatrix prototype:prototype numberOfRows:1 numberOfColumns:2];

    [[matrix superview] replaceSubview:matrix with:newMatrix];

    [matrix release];

    matrix = newMatrix;

 // set the background gray of tabMatrix to NX_DKGRAY 
    [matrix setBackgroundColor:[NSColor darkGrayColor]];

 // set the autosizing and autoscrolling attributes of the matrix 
    [matrix setAutoresizingMask:NSViewWidthSizable];
    [matrix setAutoscroll:YES];

 // size tabMatrix to its cells, resize matrix so that nice NX_DKGRAY border
 // frames tabs, and display it 
    [matrix sizeToFit];
    [matrix setAutosizesCells:YES];
   // [matrix sizeBy:0.0 :4.0];
    [matrix display];    

}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.