Thanks Corbin,

   this over-ride seems to work. Surely this shouldn't be that obscure
though ...

- (void) addColumn
{
    [super addColumn];
    int lastColumnIndex = [self lastColumn];
    NSMatrix *matrix = [self matrixInColumn:lastColumnIndex];
    NSSize intercellSpacing = NSMakeSize(0, 1);
    [matrix setIntercellSpacing:intercellSpacing];
}


On Tue, May 6, 2008 at 7:13 PM, Corbin Dunn <[EMAIL PROTECTED]> wrote:
>
>
>  On May 6, 2008, at 8:07 AM, Jens Alfke wrote:
>
> >
> > On 5 May '08, at 11:31 PM, Martin Redington wrote:
> >
> >
> > > I tried subclassing NSMatrix, and over-riding
> > >
> > > -[NSMatrix initWithFrame: mode:prototype:numberOfRows:numberOfColumns:]
> > >
> > > to set the intercellSpacing. I can see it getting called, but I don't
> > > get any gaps between rows, and when I browse the NSMatrix with
> > > F-Script, the intercellSpacing shows up as (0, 0).
> > >
> >
> > The browser is probably setting it to a default value later on when it
> initializes iself. Why not just set it in your controller's -windowDidLoad
> or -awakeFromNib method?
> >
>
>  That's too late or too early, depending on how you look at it.
>
>  You could (probably) override -addColumn in NSBrowser, call super, then get
> the last matrix, and *then* set the spacing. I haven't tried this, but it
> might work.
>
>  corbin
>



-- 
http://www.mildmanneredindustries.com/
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to