• 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
Resizing NSScrollView/NSClipView to fit NSTableView width
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resizing NSScrollView/NSClipView to fit NSTableView width


  • Subject: Resizing NSScrollView/NSClipView to fit NSTableView width
  • From: studfed studfed <email@hidden>
  • Date: Mon, 15 Aug 2016 20:22:08 +0300

Hi,

I have added NSTableView to xib (which adds scrollview and clipview by
default), without columns.
Columns are generated programmatically with width based on header cell
size. Autolayout is enabled and constraints are defined in IB like |
-20-|[scrollview]-20-|

It looks like
Window
             MyView
                        NSScrollView
                                  ClipView
                                            TableView


The problem is that as soon as columns count grows, table becomes clipped.

The only way to set scrollview/clipview to fit table width, was to set
frameSize of scrollerView's to be equal to tableView frame size like:

[scrollView setFrameSize:[tableView frame].size];

I am not sure if it is the right way to prevent table clipping.
Are there any other options to accomplish this or this one is correct also
?

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: Resizing NSScrollView/NSClipView to fit NSTableView width
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Class is implemented in both
  • Next by Date: Re: Class is implemented in both
  • Previous by thread: Re: Bug in 10.12 drawing glyph from labelFont or systemFont with bezier path
  • Next by thread: Re: Resizing NSScrollView/NSClipView to fit NSTableView width
  • Index(es):
    • Date
    • Thread