• 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
Re: nstableview **very** basic question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nstableview **very** basic question


  • Subject: Re: nstableview **very** basic question
  • From: Michael <email@hidden>
  • Date: Sat, 21 Mar 2009 22:51:54 -0600


On Mar 21, 2009, at 9:24 PM, Jerry Krinock wrote:


On 2009 Mar 21, at 14:27, Michael wrote:

I cannot get tableview to show columns of constant width.

[tv sizeToFit];

What I get when I use the above code is the first couple of columns varying in size, then the next "n" columns equally space.

If I have missed something in the documentation,

Maybe you have. The documentation for -[NSTableView sizeToFit] says:
"All columns are resized to the same size, up to a column's maximum size."


Yes...I did see that, but I read it slightly differently. I read it to mean that the receiver's columns will be set equal to one another up to the max size. I assumed that tableview would know the max width of the view and calculate the widths accordingly. What I was getting was unequal widths.


Hmmmm. What are your columns' maximum sizes? These can be set in Interface Builder, but to find out for sure, try something like this:

There were some **very** weird max widths!! :-) which may have played a role here..widths with integers in the 20 to 30 figures long!!
Eg (340282306073709652508363335590014353408.000000)


I got it to work as I expected it by doing what you suggested...I think. ie setting each column to the same max width...

Thank you ...appreciated.




_______________________________________________

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


References: 
 >nstableview **very** basic question (From: Michael <email@hidden>)
 >Re: nstableview **very** basic question (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: De-Mystifying NSCell
  • Next by Date: IB instantiating objects
  • Previous by thread: Re: nstableview **very** basic question
  • Next by thread: NSString and Leaks Instrument, False Positives?
  • Index(es):
    • Date
    • Thread