• 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
Non-IB NSTextFieldCell text truncated unexpectedly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Odd memory issue -- not a newbie
  • Next by Date: Re: Odd memory issue -- not a newbie
  • Previous by thread: Re: 'WebKit/WebKit.h' not found
  • Next by thread: textview highlighting behavior
  • Index(es):
    • Date
    • Thread