开发者

Can I put a NSDatePicker object in a cell of NSTableView?

开发者 https://www.devze.com 2023-03-26 14:32 出处:网络
Right now I am just using a NSTextCell with a NSDateFormatter, I just wanted to know if this was possible, p开发者_如何学JAVAerhaps by using the .

Right now I am just using a NSTextCell with a NSDateFormatter, I just wanted to know if this was possible, p开发者_如何学JAVAerhaps by using the .

Thanks in advance!


not without making a bunch of hacking... Apple doesn't provide the date picker cell for the table for some reason. I would keep the date formatter or make it so when the cell is clicked, it pops open the graphical date picker.

I created a menu in the xib file, set the outlet for the cell's menu property to the menu, created a subclass of nsdatepicker, overrode the mouseDown:, and made it display the menu when clicked.

0

精彩评论

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