开发者

Hightlight color for NSDatepickerCell

开发者 https://www.devze.com 2022-12-14 06:23 出处:网络
I am trying to do a little timer app in Objective-C/Cocoa. I am using the NSDatePicker to be able to set the start value. I managed to change the text color to green, because the whole app will be in

I am trying to do a little timer app in Objective-C/Cocoa. I am using the NSDatePicker to be able to set the start value. I managed to change the text color to green, because the whole app will be in green on a HUD panel:

date picker right http://jeenaparadies.net/t/s/datepicker-right.png

But there is a problem. Whenever I am using the picker to change the value, it highlights it wit a gray color and you can't se what value it has unless you click somewhere else:

date picker wrong http://jeenaparadies.net/t/s/datepicker-wrong.png

I am looking for hours now, bu开发者_开发百科t have no clue how to fix it, any suggestions?


NSDatePickerCell is a subclass of NSCell, which has the -highlightColorWithFrame:inView: method, which you can override and return any highlight color you wish.

0

精彩评论

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