Re: NSDatePicker, selecting elements, and field editors
Re: NSDatePicker, selecting elements, and field editors
- Subject: Re: NSDatePicker, selecting elements, and field editors
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 20 May 2011 14:27:44 -0600
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 (email@hidden)
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:
This email sent to email@hidden