开发者

Creating NSMatrix of NSImageCells

开发者 https://www.devze.com 2022-12-08 10:06 出处:网络
I need to create an NSMatrix with NSImageCells bound to an array controller. So the content of the NSMatrix is bound to an NSArray (so there are as many NSImageCells in the matrix as there are objects

I need to create an NSMatrix with NSImageCells bound to an array controller. So the content of the NSMatrix is bound to an NSArray (so there are as many NSImageCells in the matrix as there are objects in the array), then the image path of the NSImageCells are bound to a key called "iconPath" in the Array Controller.

开发者_如何学运维And then when an image cell is clicked in the matrix, I need it to perform an action. I know how to use bindings, and I have a concept like this working in an NSTableView, but I have never used NSMatrix before, so are there any good resources or sample code that would help me get started with this?

Thanks


If you want them to send actions when you click on them, then you probably want NSButtonCell instead of NSImageCell. A button cell can still contain an image.

0

精彩评论

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

关注公众号