• 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
Setting the size of NSTableView columns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the size of NSTableView columns


  • Subject: Setting the size of NSTableView columns
  • From: Eric Gorr <email@hidden>
  • Date: Mon, 10 Dec 2007 22:43:15 -0500

I know what text will be appearing in the cells of my table and I am building the table dynamically in my code.

What I would like to be able to do is explicitly set the width of my columns to be only as wide as they need to be.

I believe I can determine the width of the text using the sizeWithAttributes message, but I am not certain what the attributes should be. Is it possible to determine the attributes which will be used for table cells containing text?

Is there some other way to do what I want?

_______________________________________________

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: Setting the size of NSTableView columns
      • From: Eric Gorr <email@hidden>
  • Prev by Date: Need help wrapping my head around bindings
  • Next by Date: Re: Extra call to validateMenuItem before triggering action; new in Leopard?
  • Previous by thread: Re: Need help wrapping my head around bindings
  • Next by thread: Re: Setting the size of NSTableView columns
  • Index(es):
    • Date
    • Thread