• 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: Jerry Krinock <email@hidden>
  • Date: Sat, 21 Mar 2009 20:24:38 -0700


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."


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

for (NSTableColumn* tc in [tv tableColumns]) {
   NSLog(@"maxWidth = %f", [tc maxWidth]) ;
}


_______________________________________________

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: nstableview **very** basic question
      • From: Michael <email@hidden>
References: 
 >nstableview **very** basic question (From: Michael <email@hidden>)

  • Prev by Date: Re: NSAppleScript - what is going on here?
  • Next by Date: How can main thread be blocked in mach_msg_trap?
  • Previous by thread: nstableview **very** basic question
  • Next by thread: Re: nstableview **very** basic question
  • Index(es):
    • Date
    • Thread