How to change NSTextField background color in NSPopOver

前端 未结 3 1853
南旧
南旧 2020-12-06 17:35

\"enter

Mac OSX 10.10 Xcode 6.1

I created a tableview in NSPopOver. I try to

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 18:31

    In my app, I had same problem. I used Swift and this worked for me. In your viewForTableColumn:

    let cell = tableView.makeViewWithIdentifier(tableColumn!.identifier!, owner: self) as! NSTableCellView
        cell.textField?.drawsBackground = true
        cell.textField?.backgroundColor = NSColor.clearColor()
    

提交回复
热议问题