- Home
- General Usage
- DCX Controls
- DCX Features
- About DCX
|
| DateTime Picker |
The DateTime Picker control allows users to select a date or time in a neat way, automatically enclosing the calendar control and also providing UpDown spinners on date/time values.
It is highly recommended that you familiarise yourself with how the mIRC functions $ctime and $asctime() functions work before using this control.
Root control: Date And Time Picker
|
| Control Styles |
| These control styles are available when creating a DateTime Picker control. Remember that the general styles disabled, group, hidden, notheme, tabstop and transparent apply to all DCX controls except the embedded Dialog and Window controls. |
| /xdid flags |
| Control commands are input to the control with the /xdid command. |
|
/xdid -k |
| This command lets you change the calendar colour. |
| Syntax: |
/xdid -k [DNAME] [ID] [+FLAGS] [COLOR] or +A [COLOR] [COLOR] [COLOR] [COLOR] [COLOR] [COLOR] |
| Example: |
/xdid -k dcx 4 +bi $rgb(255,0,255) /xdid -k dcx 4 +A $rgb(255,0,255) $rgb(0,255,255) $rgb(0,0,255) $rgb(0,128,0) $rgb(255,128,255) $rgb(128,128,128)
|
| Parameters: |
| +FLAGS |
Calendar flags. |
| b |
Calendar background. |
| g |
Month background. |
| t |
Day text. |
| i |
Title background and selected day background color. |
| a |
Title text and selected day text color. |
| r |
Trailing text (days not included in this month). |
| A |
Set all the colours at once. This flag cannot be used in combination with any other. |
| COLOR |
The color to set. |
|
/xdid -o |
| This command lets you set format of the DateTime Picker text. |
| Syntax: |
/xdid -o [DNAME] [ID] [FORMAT] |
| Example: |
/xdid -o dcx 4 'Right now it is: 'hh':'m':'s ddddMMMdd', 'yyy |
| Parameters: |
| FORMAT |
Date time format options. |
| 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. |
| h |
The one- or two-digit hour in 12-hour format. |
| hh |
The two-digit hour in 12-hour format. Single-digit values are preceded by a zero. |
| H |
The one- or two-digit hour in 24-hour format. |
| HH |
The two-digit hour in 24-hour format. Single-digit values are preceded by a zero. |
| m |
The one- or two-digit minute. |
| mm |
The two-digit minute. Single-digit values are preceded by a zero. |
| 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. |
| t |
The one-letter AM/PM abbreviation (that is, AM is displayed as "A"). |
| tt |
The two-letter AM/PM abbreviation (that is, AM is displayed as "AM"). |
| yy |
The last two digits of the year (that is, 1996 would be displayed as "96"). |
| yyyy |
The full year (that is, 1996 would be displayed as "1996"). |
| | Note.- Any non-format characters must be enclosed within single quotes.
- A DTP control tracks locale changes when it is using the default format string.
|
|
/xdid -r |
| This command lets you set the range of the first and last selectable dates. |
| Syntax: |
/xdid -r [DNAME] [ID] [MIN_TIMESTAMP] [MAX_TIMESTAMP] |
| Example: |
/xdid -r dcx 4 $ctime(3rd July 2006) $ctime /xdid -r dcx 4 nolimit $ctime
|
| | | Note. You can use nolimit for MIN_TIMESTAMP or MAX_TIMESTAMP if you wish to specify no minimum or maximum date range respectively. |
|
/xdid -t |
| This command lets you set the selected date/time. |
| Syntax: |
/xdid -t [DNAME] [ID] [TIMESTAMP] |
| Example: |
/xdid -t dcx 4 $ctime(3rd July 3006) |
| | | Note. You can use reset for TIMESTEMP to set it back to the current date/time, but this only applies to the shownone style. |
|
/xdid -D |
| This command lets you change controls dropdown font. |
| Syntax: |
/xdid -D [DNAME] [ID] [+FLAGS] [CHARSET] [SIZE] [FONTNAME] |
| Example: |
/xdid -D dcx 4 +abs ansi 10 Tahoma |
| Parameters: |
| +FLAGS |
Font style flags. |
| a |
Font is anti-aliased. |
| b |
Font is bold. |
| d |
Default font. |
| i |
Font is italic. |
| s |
Font is strikedout. |
| u |
Font is underlined. |
| CHARSET |
Can be any of the following: ansi, baltic, chinesebig, default, easteurope, gb2312, greek, hangul, mac, oem, russian, shiftjis, symbol, turkish, or vietnamese. |
| SIZE |
Font size in points. |
| FONTNAME |
Font name. Ex: Tahoma, Courier New, Arial, ... |
| | Note.- Font names are limited to 31 chars (system definition).
- When using +d, CHARSET SIZE and FONTNAME can be omitted.
|
| $xdid() Properties |
| The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls. |
|
$xdid().calcolor |
| This property lets you retreive the colours of the control. |
| Syntax: |
$xdid(dialog, ID, [COLOR]).calcolor |
| Example: |
$xdid(dcx, 4, background).calcolor $xdid(dcx, 4, monthbk).calcolor $xdid(dcx, 4, text).calcolor $xdid(dcx, 4, titlebk).calcolor $xdid(dcx, 4, titletext).calcolor $xdid(dcx, 4, trailingtext).calcolor $xdid(dcx, 4, all).calcolor
|
| Parameters: |
| background |
The background colour. |
| monthbk |
The months background colour. |
| text |
The text colour. |
| titlebk |
The titles background. |
| titletext |
The title text colour. |
| trailingtext |
The trailing text colour. |
| all |
All the above at once. |
| | | Note. The all arg returns all the colours at once. |
|
$xdid().calfont |
| This property lets you retreive the current fonts details. |
| Syntax: |
$xdid(dialog, ID).calfont |
| Example: |
$xdid(dcx, 4).calfont |
| | | Note. The return value is in the format +flags charset size fontname, where +flags is specfied in /xdid -f |
|
$xdid().calstyle |
| This property lets you retreive the calendar controls current styles. |
| Syntax: |
$xdid(dialog, ID).calstyle |
| Example: |
$xdid(dcx, 4).calstyle |
|
$xdid().ideal |
| This property lets you retreive the ideal width and height of the control. |
| Syntax: |
$xdid(dialog, ID).ideal |
| Example: |
$xdid(dcx, 4).ideal |
|
$xdid().range |
| This property lets you retreive the date/time range. |
| Syntax: |
$xdid(dialog, ID).range |
| Example: |
$xdid(dcx, 4).range |
| | | Note. nolimit is returned when the calendar range is not bounded. |
|
$xdid().text |
| This property lets you retreive the selected date/time as plain text. |
| Syntax: |
$xdid(dialog, ID).text |
| Example: |
$xdid(dcx, 4).text |
|
$xdid().value |
| This property lets you retreive the selected date/time. |
| Syntax: |
$xdid(dialog, ID).value |
| Example: |
$xdid(dcx, 4).value |
| DateTime Picker Events |
| These events are fired when activity occurs in the DateTime Picker control. |
|
change |
| When the date/time selection has changed. |
| Syntax: |
/cb_alias DNAME change ID SELECTION |
| Example: |
/cb_alias dcx change 4 1152622371 /cb_alias dcx change 4 none
|
| Parameters: |
| SELECTION |
The date selected. If this value is none, then the date has been cleared. |
| | | Note. SELECTION can only be none when the shownone style is used. |
|
closed |
| The dropdown calendar was closed. |
| Syntax: |
/cb_alias DNAME closed ID |
| Example: |
/cb_alias dcx closed 4 |
|
open |
| The dropdown calendar was opened. |
| Syntax: |
/cb_alias DNAME open ID |
| Example: |
/cb_alias dcx open 4 |
|