NSCell setControlSize:NSSmallControlSize doesn't show change
NSCell setControlSize:NSSmallControlSize doesn't show change
- Subject: NSCell setControlSize:NSSmallControlSize doesn't show change
- From: BareFeet <email@hidden>
- Date: Mon, 14 Sep 2009 11:57:27 +1000
Hi all,
I'm programmatically building an NSTable. I add columns in a loop and
am trying to set various attributes. All of it works except
setControlSize:NSSmallControlSize. When I get the value after setting
(ie using controlSize), it seems to have changed, but the actual cell/
column is still shown in regular size (even after initiating a view
update). What am I missing?
Sample code:
// BFTableViewCategory.h
#import <Cocoa/Cocoa.h>
@interface NSTableView (ExtrasByTom)
- (void) createColumns:(NSArray*)dataColumns;
@end
#import "BFTableViewCategory.h"
@implementation NSTableView (ExtrasByTom)
- (void) createColumns:(NSArray*)dataColumns {
for (NSString* columnName in columnNames) {
NSTableColumn* newTableColumn = [[[NSTableColumn alloc]
initWithIdentifier:columnName] autorelease];
[[newTableColumn headerCell] setStringValue:columnName];
[self addTableColumn:newTableColumn];
[[newTableColumn dataCell] setAlignment:NSRightTextAlignment];
[[newTableColumn dataCell] setControlSize:NSSmallControlSize]; //
only thing that doesn't show change
[newTableColumn setWidth:100];
}
}
Thanks,
Tom
BareFeet
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden