FutureBasic Logo

<<    Index    >> FutureBasic

DatePicker   statement / function



Statement syntax
datepicker tag, enabled, date, rect, style, elements, wndTag

Function syntax
date = datepicker(tag)

Description
The datepicker statement puts a new datepicker in the current output window, or alters an existing datepicker's characteristics. The datepicker function returns the date of the datepicker as a CFDateRef and is equivalent to calling fn DatePickerDateValue.

Parameters
Parameter
Description
tag A number (1 through 1000000) that you assign when you create the datepicker and that you refer to when altering the picker. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the datepicker.
enabled A boolean value which specifies whether the datepicker should be enabled or disabled.
date The initial date to be displayed in the datepicker. This parameter is a CFDateRef.
rect The datepicker's enclosing rectangle. This can be specified in either of two ways:
(i) (x,y,w,h) where x,y are the origin and w,h the size of the picker.
(ii) A CGRect value
style The datepicker style:
NSDatePickerStyleTextFieldAndStepper (default)
NSDatePickerStyleClockAndCalendar
NSDatePickerStyleTextField

elements The elements displayed in the datepicker. These can be combined using '+':
NSHourMinuteDatePickerElementFlag (default)
NSHourMinuteSecondDatePickerElementFlag
NSTimeZoneDatePickerElementFlag
NSYearMonthDatePickerElementFlag
NSYearMonthDayDatePickerElementFlag
NSEraDatePickerElementFlag

wndTag An optional parameter for when the datepicker's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
 
Dialog event
_btnClick
 

Apple documentation
NSDatePicker