• 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
Auto-resizing column based on the data inside it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Auto-resizing column based on the data inside it?


  • Subject: Auto-resizing column based on the data inside it?
  • From: Rob Petrovec <email@hidden>
  • Date: Wed, 2 Apr 2008 19:05:38 -0700

Hey,
I have an NSScrollView with an NSTableView embedded inside it. The NSTableView is bound to a custom NSArrayController as its data source and delegate. The NSTableView only has one column that shows a string of text (NSTextFieldCell) in each row. The problem is that when the text gets long in a given row, the horizontal scroll bar doesn't appear because the Column isn't adjusting its width based on the text inside it. Anyone have an idea on how to set it up so that the column will auto-resize itself based on the text inside it? The only column resizing docs/info I could find will make the column resize based on the NSTableView itself, which is not what I want.


Thanks...
_______________________________________________

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: Auto-resizing column based on the data inside it?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: DataSource for NSTableView with ButtonCell
  • Next by Date: Re: Making a window fit its contents?
  • Previous by thread: Re: About the Primary Button problems in Cocoa Mouse Event Handling
  • Next by thread: Re: Auto-resizing column based on the data inside it?
  • Index(es):
    • Date
    • Thread