3

macOS:how to add a button for creating new file in a NSOpenPanel?(not create folder button) enter image description here

Ank
  • 1,864
  • 4
  • 31
  • 51
vivi wu
  • 31
  • 2

1 Answers1

1

Have a look at NSOpenPanel's accessoryView property, which you can use to add arbitrary buttons and other UI elements to the open panel.

Charles Srstka
  • 16,665
  • 3
  • 34
  • 60
  • 1
    The accessory view would display on top of the buttons though, right? Is there a way you can add custom buttons to that bar? E.g: I see an `Options` button when opening a new file in TextEdit – jjramos Jun 02 '20 at 16:09
  • 1
    Were you able to find out, how to do that? – spt025 Jul 31 '20 at 09:28