本文介绍了NSButton +&- 按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,我需要添加+&-按钮,用于在表格中添加和删除行,我试图找出任何默认的图片/按钮,但没有得到正确的+和&图像.- 按钮,我需要自行排列这些按钮图像还是可可框架中可用的图像.再次感谢您查看问题,可能是愚蠢的问题

In my application, i need to add + & - button to add and delete the row from a table,I tried to find out any default image/ button but didn't get , Proper images for + & - button,Do i need to arrange these buttons image by my own or its available in the Cocoa framework.Thanks again for looking at question, probably silly question doesn't it

推荐答案

为此提供了系统提供的图像,分别命名为 NSAddTemplate NSRemoveTemplate .您可以在Interface Builder中为按钮的图像字段输入这些名称,或者使用以下常量以编程方式访问图像:

There are system-provided images for this, named NSAddTemplate and NSRemoveTemplate. You can enter those names into the image field for your buttons in Interface Builder, or alternatively use these constants to access the images programmatically:

[NSImage imageNamed:NSImageNameAddTemplate];
[NSImage imageNamed:NSImageNameRemoveTemplate];

这篇关于NSButton +&- 按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 05:19