开发者

An NSButton with two combined images (Cocoa OSX)

开发者 https://www.devze.com 2022-12-29 16:26 出处:网络
I want to make a type of popupbutton sort of like the开发者_如何学运维 action button on OSX.I need to make the button have two images makeup the representation of the button (the icon for the button a

I want to make a type of popupbutton sort of like the开发者_如何学运维 action button on OSX. I need to make the button have two images makeup the representation of the button (the icon for the button and the downward facing disclosure triangle next to it). I was thinking maybe I could add the second image as a subview of the button but it seems that there should be a simpler way to do this. Any ideas?


Make an NSPopUpButton whose pullsDown is set to YES (Type of “Pull Down” in IB) and whose image is set to the image named NSImageNameActionTemplate (“NSActionTemplate” in IB).

0

精彩评论

暂无评论...
验证码 换一张
取 消