Re: NSDatePicker, selecting elements, and field editors
Re: NSDatePicker, selecting elements, and field editors
- Subject: Re: NSDatePicker, selecting elements, and field editors
- From: Howard Siegel <email@hidden>
- Date: Fri, 20 May 2011 13:21:49 -0700
On Fri, May 20, 2011 at 11:51, Nick Zitzmann <email@hidden> wrote:
> I read TFM and searched TFW, and could not find answers to two questions I
> have about NSDatePicker:
>
> ....
>
> 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.
- (void)setDatePickerElements:(NSDatePickerElementFlags)*elementFlags*
Parameters*elementFlags*
A bitmask that specifies the date picker elements displayed by the receiver.
See “Constants” in
NSDatePickerCell<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/occ/cl/NSDatePickerCell>for
a description of the possible values.
Date Picker Elements
The NSDatePickerElementFlag constants allow you to specify the date and time
elements that the NSDatePickerCell can edit by combining these constants
using the C bitwise OR operator. These values are used by
datePickerElements<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDatePickerCell/datePickerElements>and
setDatePickerElements:<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDatePickerCell/setDatePickerElements:>
:
enum {
NSHourMinuteDatePickerElementFlag
<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSHourMinuteDatePickerElementFlag>
= 0x000c,
NSHourMinuteSecondDatePickerElementFlag
<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSHourMinuteSecondDatePickerElementFlag>
= 0x000e,
NSTimeZoneDatePickerElementFlag
<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSTimeZoneDatePickerElementFlag>
= 0x0010,
NSYearMonthDatePickerElementFlag
<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSYearMonthDatePickerElementFlag>
= 0x00c0,
NSYearMonthDayDatePickerElementFlag
<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSYearMonthDayDatePickerElementFlag>
= 0x00e0,
NSEraDatePickerElementFlag
<http://developer.apple.com/library/mac/documentation/cocoa/reference/ApplicationKit/Classes/NSDatePickerCell_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSEraDatePickerElementFlag>
= 0x0100,
};
typedef NSUInteger NSDatePickerElementFlags;
ConstantsNSHourMinuteDatePickerElementFlag
Display and allow editing of the hour and minute elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSHourMinuteSecondDatePickerElementFlag
Display and allow editing of the hour, minute and second elements of the
date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSTimeZoneDatePickerElementFlag
Display and allow editing of the time zone.
This flag has been declared for possible future use, and does not yet have
any effect.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSYearMonthDatePickerElementFlag
Display and allow editing of the year and month elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSYearMonthDayDatePickerElementFlag
Display and allow editing of the year, month and day elements of the date.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
NSEraDatePickerElementFlag
Display and allow editing of the era of the date, if applicable.
This flag has been declared for possible future use, and does not yet have
any effect.
Available in Mac OS X v10.4 and later.
Declared in NSDatePickerCell.h.
_______________________________________________
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