Non-IB NSTextFieldCell text truncated unexpectedly
Non-IB NSTextFieldCell text truncated unexpectedly
- Subject: Non-IB NSTextFieldCell text truncated unexpectedly
- From: David Bainbridge <email@hidden>
- Date: Sun, 14 Dec 2003 20:20:49 -0600
When dynamically creating and setting an EDITABLE NSTextFieldCell to a
table column the text is truncated to the column width. When you
double-click to edit the text the truncated text is all that is
displayed in the edit field as opposed to the full string. It does not
truncate if the column is set-up using the default nstextfieldcell in
IB. Thanks for any clues..
-(void)awakeFromNib
{
NSTableColumn *column;
NSTextFieldCell *cell;
[self setDrawsGrid:NO];
[self setDrawsGrid:YES];
column = [self tableColumnWithIdentifier:@"FirstColumn"];
cell = [[NSTextFieldCell alloc] init];
[cell setEditable:YES];
[column setDataCell:cell];
}
The text is actually a full path string representation to a file that
was dragged and dropped onto the table (See
http://developer.apple.com/samplecode/Sample_Code/Cocoa/MP3_Player.htm
which this code is based on).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.