• 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: Sidebar outline view, rowSizeStyle, and bold text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sidebar outline view, rowSizeStyle, and bold text


  • Subject: Re: Sidebar outline view, rowSizeStyle, and bold text
  • From: corbin dunn <email@hidden>
  • Date: Fri, 10 Jun 2016 09:46:16 -0700

> On Jun 10, 2016, at 7:58 AM, David Catmull <email@hidden> wrote:
>
> I have a view-based, sidebar-style NSOutlineView. For some items, I want to
> make the text bold. But if I change the rowSizeStyle to medium instead of
> the default (in awakeFromNib), the text doesn't display as bold. If instead
> I use a custom row size (in outlineView:heightOfRowByItem:) it works. What
> gives?

Let’s take a look at the header :)

typedef NS_ENUM(NSInteger, NSTableViewRowSizeStyle) {
    /* The table will use the system default layout size: small, medium or large. */
    NSTableViewRowSizeStyleDefault = -1,

    /* The table will use the -rowHeight or ask the delegate for a variable row height (if implemented) and cell layout is not changed. */
    NSTableViewRowSizeStyleCustom = 0,

    /* The table will use a row height specified for a small/medium or large table.
     It is required that all sizes be fully tested and supported if NSTableViewRowSizeStyleCustom is not used.
     Some standard Aqua metrics may be applied to cells based on the current size. */
    NSTableViewRowSizeStyleSmall = 1,
    NSTableViewRowSizeStyleMedium = 2,
    NSTableViewRowSizeStyleLarge = 3,
} NS_ENUM_AVAILABLE_MAC(10_7);


So, if you set it to Small/Medium/Large then you will get some standard metrics applied to things. Specifically, things setup to these outlets on an NSTableCellView:

@property (nullable, assign) IBOutlet NSTextField *textField;
@property (nullable, assign) IBOutlet NSImageView *imageView;





corbin





>
> I'm setting it to bold in outlineView:viewForTableColumn:item: by setting
> view.textField.font = NSFont boldSystemFontOfSize
> :view.textField.font.pointSize].
> _______________________________________________
>
> 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

_______________________________________________

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: Sidebar outline view, rowSizeStyle, and bold text
      • From: David Catmull <email@hidden>
References: 
 >Sidebar outline view, rowSizeStyle, and bold text (From: David Catmull <email@hidden>)

  • Prev by Date: Re: quicklook audio sample rates
  • Next by Date: Re: Sidebar outline view, rowSizeStyle, and bold text
  • Previous by thread: Sidebar outline view, rowSizeStyle, and bold text
  • Next by thread: Re: Sidebar outline view, rowSizeStyle, and bold text
  • Index(es):
    • Date
    • Thread