1 Reply
      Latest reply on Feb 12, 2020 8:44 AM by tartempion
      oneeyeman1 Level 1 Level 1 (0 points)

        Hi, ALL,

        Is it possible to customize a cell in the NSOutlineView?

         

        Namely I'm looking for:

         

        1. Making the column that contains text occupy all available space inside the control. The view will be rendered without a header, so no title and no possibility of resizing.

         

        2. Set the alignment for the content [left/center/right]-justified text/image/controls inside the cell.

         

        As far as I understand, by default the column is set to fit the content of the cells underneath and will resize itself if the data added will be wider.

         

        Thank you.

        • Re: sizing a cell in the NSOutlineView
          tartempion Level 1 Level 1 (10 points)

          1. Just have only one column in your NSOutlineView.

           

          2. Use the Xcode view inspector or change the alignment dynamically on the appropriate NSView if your outline view is view based.

           

          "As far as I understand, by default the column is set to fit the content of the cells underneath and will resize itself if the data added will be wider."

           

          Nope. The column width does not dynamically adjust to the contents of the cell. At least that's how it works when AutoLayout is disabled. And I don't remember it working differently when AutoLayout is enabled.