@...DATEPICKER DEFINE DATEPICKER Creates a DatePicker control.
|
A DatePicker control provides a simple and intuitive interface through which to exchange date information with a user.
SYNTAX
Standard Window:
@ <nRow> ,<nCol> DATEPICKER <ControlName>
[ ID <nId> ]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ VALUE <dValue> ]
[ FIELD <FieldName> ]
[ WIDTH <nWidth> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ]
[ FONTCOLOR <anFontColor> ]
[ TITLEBACKCOLOR <anTitleBackColor> ]
[ TITLEFONTCOLOR <anTitleFontColor> ]
[ TRAILINGFONTCOLOR <trlFontColor> ]
[ SHOWNONE ]
[ UPDOWN ]
[ RIGHTALIGN ]
[ DATEFORMAT <cDateFormat> ] // (* - see decription below)
[ RANGE <nRangeLow>, <nRangeHigh> ]
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ ON INIT <bInit> ]
Dialog Window:
REDEFINE DATEPICKER <ControlName>
ID <nId>]
[ OF | PARENT | DIALOG <ParentWindowName> ]
[ VALUE <dValue> ]
[ FIELD <FieldName> ]
[ FONT <cFontName> SIZE <nFontSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ]
[ FONTCOLOR <anFontColor> ]
[ TITLEBACKCOLOR <anTitleBackColor> ]
[ TITLEFONTCOLOR <anTitleFontColor> ]
[ TRAILINGFONTCOLOR <anTrlFontColor> ]
[ RANGE <dRangeMin> , <dRangeMax> ]
[ SHOWNONE ]
[ UPDOWN ]
[ RIGHTALIGN ]
[ DATEFORMAT <cDateFormat> ] // (* - see decription below)
[ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ON CHANGE <OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ON ENTER <OnEnterProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ INVISIBLE ]
[ NOTABSTOP ]
[ ON INIT <bInit> ]
Alternate Syntax:
DEFINE DATEPICKER <ControlName>
[ ID <nId> ]
[ PARENT <ParentWindowName> ]
COL <nCol>
ROW <nRow>
[ VALUE <dValue> ]
[ FIELD <FieldName> ]
[ WIDTH <nWidth> ]
[ FONTNAME <cFontName> ]
[ FONTSIZE <nFontSize> ]
[ FONTBOLD < .T. | .F.> ]
[ FONTITALIC < .T. | .F.> ]
[ FONTUNDERLINE < .T. | .F.> ]
[ FONTSTRIKEOUT < .T. | .F.> ]
[ TOOLTIP <cToolTipText> ]
[ BACKCOLOR <anBackColor> ]
[ FONTCOLOR <anFontColor> ]
[ TITLEBACKCOLOR <anTitleBackColor> ]
[ TITLEFONTCOLOR <anTitleFontColor> ]
[ TRAILINGFONTCOLOR <anTrlFontColor> ]
[ RANGEMIN <dRangeMin> ]
[ RANGEMAX <dRangeMax> ]
[ SHOWNONE < .T. | .F.> ]
[ UPDOWN < .T. | .F.> ]
[ RIGHTALIGN < .T. | .F.> ]
[ DATEFORMAT <cDateFormat> ]
[ ONGOTFOCUS <OnGotFocusProcedure> | <bBlock> ]
[ ONCHANGE <OnChangeProcedure> | <bBlock> ]
[ ONLOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]
[ ONENTER <OnEnterProcedure> | <bBlock> ]
[ HELPID <nHelpId> ]
[ INVISIBLE < .T. | .F.> ]
[ NOTABSTOP < .T. | .F.> ]
[ ONINIT <bInit> ]
END DATEPICKER
nRow, nCol
|
Position in the area of ??the window in pixels.
|
nWidth, nHeight
|
The desired size of the DatePicker Control in pixels.
|
nId
|
The ID identifier this Control in Dialog Window
|
ControlName
|
A reference to the DatePicker Control
|
ParentWindowName
|
A reference to the Parent Window.
|
nHelpId
|
The help topic identifier for this Control
|
cFontName
|
Specifies the Font Name
|
nFontSize
|
Specifies the Font Size
|
cToolTipText
|
Specifies the Text for the ToolTip
|
anBackColor
|
Specifies the Background Color
|
anFontColor
|
Specifies the Font Color
|
aTitleBackColor
|
Specifies the Title Background Color
|
anTitleFontColor
|
Specifies the Title Font Color
|
anTriFontColor
|
Specifies the Trailing Font Color
|
cDateFormat
|
Specifies the Date Format
|
OnGotFocusProcedure
|
An action to be performed on Got Focus
|
OnChangeProcedure
|
An action to be performed on Change
|
OnLostFocustProcedure
|
An action to be performed on Lost Focus
|
OnEnterProcedure
|
An action to be performed on ENTER
|
dRangeMin
|
Specifies the Minimum Date allowed
|
dRangeMax
|
Specifies the Maximum Date allowed
|
|
|
SHOWNONE
|
?
|
UPDOWN
|
?
|
RIGHTALIGN
|
?
|
INVISIBLE
|
The visibility property specifies whether or not a control is
visible
|
NOTABSTOP
|
Stop the control to receive focus and participate in the tabbing
sequence
|
PROPERTIES:
Set / Gets DatePicker value.
| |
Set / Gets enabled state of a DatePicker control
| |
Set / Gets visible a DatePicker control.
| |
Set / Gets row position of a DatePicker control.
| |
Set / Gets column position of a DatePicker control.
| |
Set / Gets width of a DatePicker control.
| |
Set / Gets height of a DatePicker control.
| |
Set / Gets DatePicker control's font name.
| |
Set / Gets DatePicker control's font size.
| |
Set / Gets DatePicker control's font bold property
| |
Set / Gets DatePicker control's font italic property
| |
Set / Gets DatePicker control's font underline property
| |
Set / Gets DatePicker control's font strikeout property
| |
Set / Gets DatePicker control's tooltip text.
| |
Set / Gets user property 'Cargo' for DatePicker control
| |
Set / Gets the format string of a DatePicker control.
| |
Set / Gets range max of a DatePicker control.
| |
Set / Gets range min of a DatePicker control.
| |
Retrieves the name of a DatePicker control.
| |
Set the name as character identifier of the parent window.
| |
Set the numeric help topic identifier of the control.
| |
Sets whether an element behavior can't receive focus and participate
in the tabbing sequence
| |
Set the Field data of active database.
| |
The control displays a check box that is automatically selected
whenever a date is picked or entered
| |
The user can select a specific date by clicking an area of the
calendar.
| |
The drop-down month calendar will be right-aligned with the control
|
D: Available at control definition only
R: Read-Only
(*) see description below
EVENTS:
Action to be performed when getting the focus
| |
Action to be performed when generic changing of the control
| |
Action to be performed when losing the focus.
|
METHODS:
Shows a DatePicker control
| |
Hides a DatePicker control
| |
Redraw a Control
| |
Gives the focus to a DatePicker control
| |
Releases a DatePicker control from memory
| |
Repaint a Control
| |
Save data for Control DatePicker
| |
Save a
DatePicker control as BitMap file.
|
Remarks :
This control always return Value as Harbour/Clipper DATE value type
If SHOWNONE clause is used and shownone checkbox is unchecked - DATEPICKER return an empty 'date'
If no value is set this control Value is filled by current system date value
It is NOT possible to Set a null date value. Use the control if necessary Textbox or Getbox instead
(*) Characters available to format date display as DATEFORMAT clause or FormatString property
You can set/get Value property at runtime:
- function syntax:
SetProperty ( Form, DatePick, 'Value', tDateTime )
GetProperty ( Form, DatePick, 'Value' ) --> tDateTime
- pseudo-OOP syntax:
Form.DatePick.Value := tDateTime
Form.DatePick.Value --> tDateTime
where tDateTime may be array { y, m, d, h, m, s [, ms] } as input.
Element Description
"d"
|
The one- or two-digit day.
|
"dd"
|
The two-digit day. Single-digit day values are preceded by a zero.
|
"ddd"
|
The three-character weekday abbreviation.
|
"dddd"
|
The full weekday name.
|
"M"
|
The one- or two-digit month number.
|
"MM"
|
The two-digit month number. Single-digit values are preceded by a zero.
|
"MMM"
|
The three-character month abbreviation.
|
"MMMM"
|
The full month name.
|
"yy"
|
The last two digits of the year (that is, 2005 would be displayed as "05").
|
"yyyy"
|
The full year (that is, 2005 would be displayed as "2005").
|
To make the information more readable, you can add body text to the format string by enclosing it in single quotes. Spaces and punctuation marks do not need to be quoted.
Note: Nonformat characters that are not delimited by single quotes will result in
unpredictable display by the DTP control.
For example, to display the current date with the format "'Today is: Tuesday FEB 10,
2005",
the format string is "'Today is: 'dddd MMM dd', 'yyyy".
To include a single quote in your body text, use two consecutive single quotes.
For example, "'Don''t forget' MMM dd',' yyyy" format string produces output that
looks
like: Don't forget Mar 23, 2005.
It is not necessary to use quotes with the comma, so "'Don''t forget' MMM dd, yyyy"
is
also valid, and produces the same output.
EXAMPLE: