On May 20, 2011, at 2:21 PM, Howard Siegel wrote:

> 2. How do I select and unselect date picker elements programmatically?
> 
> setDatePickerElements:
> 
> Sets a bitmask that indicates which visual elements of the date picker are 
> currently shown, and which won't be usable because they are hidden.

That's how to _set_ date picker elements, not _select_ them.

Anyway, I did figure out how to do this. Apparently the only way to 
programmatically select a date picker element is to use private 
NSDatePickerCell methods, but to unselect all date picker elements (which is 
what I really needed to do), if you disable and then re-enable the cell, then 
the selected element gets cleared.

Unfortunately it appears that NSDatePickerCell is its own field editor, and 
there is no apparent way to customize it without source code access. Oh well.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to