• 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
Problem with NSOutlineView resizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with NSOutlineView resizing


  • Subject: Problem with NSOutlineView resizing
  • From: Gideon King <email@hidden>
  • Date: Thu, 2 May 2002 21:36:55 +0800

I have an outline view which has two columns in it. As the items are loaded, I want to set the width to be wide enough to display the widest item.

What happens is that the cell draws just first part of the string (up to the previous width), even though the title bar for the row is resized successfully. If I select the cell or resize the window etc, it draws the full cell title. I have tried various setNeedsDisplay calls to no avail.

Has anyone else worked out how to resize the width of the columns properly?


NSSize size;
NSRect rect;
[cell setStringValue:[item value]];
size = [cell cellSize];

if (size.width > columnWidth)
{
columnWidth = size.width;
}
[tableColumn setWidth:columnWidth];


TIA

Gideon
_______________________________________________
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.

References: 
 >ANN: TFM 1.0b3, dev doc/src search & viewing tool (From: Matt Covey <email@hidden>)

  • Prev by Date: addSubview \ replaceSubview won't support embedded controls
  • Next by Date: Word breaks ?
  • Previous by thread: NSPopUpButton with images
  • Next by thread: MenuItem tag
  • Index(es):
    • Date
    • Thread