xcodemacosnscombobox

Expanding NSComboBox (selectable) to fill width of GridView Cell


I am struggling to get an NSComboBox to fill the width of a GridViewCell when the Combo is in "selectable" mode - when it's "editable" it behaves as required.

When selectable the box simply displays as the width of the currently selected item - it's odd as most other controls expand to the width of the cell as expected.

Am I missing a property somewhere that will sort this?

Thanks!

Richard


Solution

  • I discovered that the fix for this is to "X placement" of the cell to "Fill" (this can also be set as standard for the column). This also solved an issue I had in macOS 10.13 where TextFields would have a zero width until the cell was set to fill.