1

I added an NSBox to my view, I set the fill color to the color I want:

enter image description here

But the color doesn't show up in Interface Builder and doesn't show up when I run the app. What am I missing?

I've also tried setting it programmatically via

[self.myBox setFillColor:[NSColor greenColor]];

but the fill color still won't change...

Troy
  • 21,172
  • 20
  • 74
  • 103

2 Answers2

6

From the NSBox documentation:

Special Considerations

Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder.

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
2

set Box Type to Custom , as in the attachment:

enter image description here

Aviram Netanel
  • 12,633
  • 9
  • 45
  • 69