Sample code for creating a NSTextField “label”?

前端 未结 6 1074
灰色年华
灰色年华 2020-12-24 01:53

In my desktop Mac OS X app, I\'d like to programatically create a NSTextField \"label\" which has the same behavior and properties as a typical label created in Interface Bu

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 02:20

    Specifically, you will want to setBordered:NO, and set the bezel style to whatever that bezel style is which I forgot. Also setEditable:NO, and optionally setSelectable:NO. That should suffice.

提交回复
热议问题