我想为我的NSOpenPanel设置标题,但它不起作用!苹果说:
获取并设置窗口顶部显示的面板的标题。
但是我不能让代码工作,不知道是怎么回事?
let nsOpenPanel = NSOpenPanel()
nsOpenPanel.canChooseFiles = true
nsOpenPanel.title = "Hello, Choose Files"
if (nsOpenPanel.runModal() == .OK) ... // rest of codes ...发布于 2022-07-17 07:23:21
title是过去macOS中的窗口有标题栏时的东西。若要在NSOpenPanel对象之上显示文本或指令,请使用message属性:
nsOpenPanel.message = "Hello, Choose Files"https://stackoverflow.com/questions/73008923
复制相似问题