NSPopUpButtonCell as NSTableView header problem
NSPopUpButtonCell as NSTableView header problem
- Subject: NSPopUpButtonCell as NSTableView header problem
- From: "Ender Wiggins" <email@hidden>
- Date: Mon, 17 Jul 2006 20:50:47 -0500
Anyone see anything wrong with adding this popup cell to the header.
When I click on a header cell of my NSTableView, the title font turns
bold, a down arrow appears, but the popup doesn't happen when
selected.
Any help much appreciated.
---
NSPopUpButtonCell *headerCell;
DataTableColumn *column;
for (i = 0; i < count; i++) {
NSString *col = [columnItems objectAtIndex:i];
headerCell = [[NSPopUpButtonCell alloc] initTextCell:col];
[headerCell setControlSize:NSMiniControlSize];
[headerCell setBordered:NO];
[headerCell setPullsDown:YES];
[headerCell addItemWithTitle:@"ItemA"];
[headerCell addItemWithTitle:@"ItemB"];
[headerCell addItemWithTitle:@"ItemC"];
column = [[NSTableColumn alloc]
initWithIdentifier:[NSNumber numberWithInt:i]];
[column setHeaderCell:headerCell];
[column sizeToFit];
[headerCell release];
[tableView addTableColumn:column];
}
[tableView reloadData];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden