• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSCell setControlSize:NSSmallControlSize doesn't show change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSCell setControlSize:NSSmallControlSize doesn't show change
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Mac Mini or iMac for Cocoa Development?
  • Next by Date: Shark newbie needs help with perf-opt
  • Previous by thread: Re: Mac Mini or iMac for Cocoa Development?
  • Next by thread: Re: NSCell setControlSize:NSSmallControlSize doesn't show change
  • Index(es):
    • Date
    • Thread