• 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
Re: NSCell setControlSize:NSSmallControlSize doesn't show change
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCell setControlSize:NSSmallControlSize doesn't show change


  • Subject: Re: NSCell setControlSize:NSSmallControlSize doesn't show change
  • From: Corbin Dunn <email@hidden>
  • Date: Mon, 14 Sep 2009 08:46:19 -0700

Setting the controlSize for an NSTextFieldCell doesn't do anything (as far as I know). You probably want to make the font size small to really see a change. Please log a bug requesting -setControlSize to do this for you automatically. I believe IB sets the font for you when this is changed there.

corbin

On Sep 13, 2009, at 6:57 PM, BareFeet wrote:

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


References: 
 >NSCell setControlSize:NSSmallControlSize doesn't show change (From: BareFeet <email@hidden>)

  • Prev by Date: Re: How to observe every child entity
  • Next by Date: Re: How to display AboutBox window in Agent Application
  • Previous by thread: NSCell setControlSize:NSSmallControlSize doesn't show change
  • Next by thread: Shark newbie needs help with perf-opt
  • Index(es):
    • Date
    • Thread