如何在Sierra应用程序中禁用“显示选项卡栏"菜单选项? [英] How do I disable the Show Tab Bar menu option in Sierra apps?

查看:71
本文介绍了如何在Sierra应用程序中禁用“显示选项卡栏"菜单选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在NSWindow中使用工具栏的应用程序.出于美观原因,我不希望用户能够自定义此工具栏.在Sierra中,有一个新的菜单选项被插入到菜单>视图"中,称为Show Tab Bar.如何禁用此功能?启用它似乎只会增加工具栏的高度,因为我没有在图标下显示额外的标签.

I've got an app that uses a Toolbar in a NSWindow. I don't want users to be able to customize this toolbar for aesthetic reasons. In Sierra there's a new Menu option that gets inserted into "Menu > View" called Show Tab Bar. How do I disable this? Enabling it only seems to increase the tool bar's height as I don't have extra labels showing under the icons.

推荐答案

在10.12上,由于默认情况下选项卡栏现在可用,因此在创建窗口时,您现在需要设置以下内容:

On 10.12, you need to now set the following when the window is created as Tab Bar is now available by default:

[NSWindow setAllowsAutomaticWindowTabbing: NO];

这篇关于如何在Sierra应用程序中禁用“显示选项卡栏"菜单选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆