I read in a file, parse the contents, and then I create NSTableColumns based on the contents of the file … and then I just addTableColumn:newColumn to the NSTableView. I've attached a small image of the problem I'm seeing where my border doesn't completely run across the bottom of each of my headers cells, rather, it only works on the first column.
Here's how I create my headers and columns ... tableHeaderCell = [[MyHeaderCell alloc] initTextCell:columnName]; [tableHeaderCell setPullsDown:NO]; [tableHeaderCell setControlSize:NSMiniControlSize]; [tableHeaderCell setBordered:NO]; [tableHeaderCell setFont:[NSFont labelFontOfSize: [NSFont smallSystemFontSize]]]; if (i == 0) { [tableHeaderCell setEditable:NO]; column = [[DataTableColumn alloc] initWithIdentifier:[NSNumber numberWithInt:i]]; } else { [tableHeaderCell setEditable:YES]; [tableHeaderCell addItemWithTitle:@"item1"]; [tableHeaderCell addItemWithTitle:@"item2"]; [tableHeaderCell addItemWithTitle:@"item3"]; column = [[NSTableColumn alloc] initWithIdentifier:[NSNumber numberWithInt:i]]; } [column setHeaderCell:tableHeaderCell]; [myTableView addTableColumn:column]; I've subclass MyHeaderCell from NSPopUpButtonCell and I draw the borders within drawInteriorWithFrame as follows … - (void) drawInteriorWithFrame:(NSRect) cellFrame inView:(NSView *) controlView { [[NSColor whiteColor] set]; [[NSBezierPath bezierPathWithRect:cellFrame] fill]; NSBezierPath *path = [NSBezierPath bezierPath]; [path moveToPoint:NSMakePoint(cellFrame.origin.x, cellFrame.size.height)]; [path lineToPoint:NSMakePoint(cellFrame.size.width, cellFrame.size.height)]; [[NSColor darkGrayColor] setStroke]; [path stroke]; [super drawInteriorWithFrame:cellFrame inView:controlView]; return; } Anyone see any reason why my header cells would not all be underlined?
<<attachment: columns-prob.tiff>>
_______________________________________________ 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 arch...@mail-archive.com