Click on NSTextField Label to emulate hyperlink to a folder

前端 未结 3 1441
[愿得一人]
[愿得一人] 2021-01-12 10:44

I have an NSTextField label and I want something to happen when a user clicks on it.

I thought I could create an IBAction and link this to the label but nothing seem

3条回答
  •  不思量自难忘°
    2021-01-12 11:50

    Labels are non-editable text fields thus don't send actions to their targets. You want to use an NSButton and turn off its border-drawing and size it to fit its text as best as possible to simulate a label.

提交回复
热议问题