简体   繁体   中英

NSProgressIndicator in NSTableCellView

I have an NSTableCellView subclass that contains an NSProgressIndicator.

I have it all updating and animating properly, however it remains greyed out. I suspect this is a view loop issue.

Any thoughts?

NSProgressIndicator will only appear blue if it's on the key window.
If your window isn't the key window you can send it that message [myWindow makeKeyWindow]
Window's without title's or resize bars may not respond to that message, so you may need to subclass your window and override - (BOOL)canBecomeKeyWindow{return YES} .
This was a problem I ran into with the tint color of an nsprogressindicator on a sheet.
The doc's say to never invoke this method directly.. [myTitlelessWindow becomeKeyWindow] but you can use it to confirm the problem before subclassing your window.

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