简体   繁体   中英

How to change icon on NSToolBarItem print

Is there a way to change icon on NSToolBarItem print? The setter for this is available via InterfaceBuilder but if I change it - it changes only in Interface Builder but not in working project. I tried to change it from code - but the same result. I have default print icon both cases. Thanks.

If this can not be changed what you can create your own toolbar item that will work for as Print.

Set new image for the toolbar button, and give Label and Palette Label, I have used My Print. 在此处输入图片说明

Now you need to hook Print menu and Toolbar item's to a method, I have a method called print in the AppDelegate.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM