On Fri, May 20, 2011 at 11:51, Nick Zitzmann <n...@chronosnet.com> 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 (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