- Home
- General Usage
- DCX Controls
- DCX Features
- About DCX
|
Calendar |
The Calendar control allows users to select a date, allowing the range to be customisable.
It is highly recommended that you familiarise yourself with how the mIRC functions $ctime and $asctime() functions work before using this control.
There is a known drawing bug with the multi select. It is a winAPI bug. Let us know if you know of a fix for it! Root control: Month Calendar
|
Control Styles |
These control styles are available when creating a Calendar 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. |
daystate |
You can specify whether specific dates are bold or not. Refer to daystate event. |
multi |
The month calendar will allow the user to select a range of dates within the control. By default, the maximum range is one week. |
notoday |
The month calendar control will not display the "today" date at the bottom of the control. |
notodaycircle |
The month calendar control will not circle the "today" date. |
weeknum |
The month calendar control will display week numbers (1-52) to the left of each row of days. Week 1 is defined as the first week that contains at least four days. |
/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 -m |
This command lets you set maximum number of days you can select at any one time. |
Syntax: |
/xdid -m [DNAME] [ID] [MAX] |
Example: |
/xdid -m dcx 4 5 |
| Note. The default value for MAX is 7. |
/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. |
/xdid -s |
This command lets you select a date, or range of dates. |
Syntax: |
/xdid -s [DNAME] [ID] [MIN_TIMESTAMP] (MAX_TIMESTAMP) |
Example: |
/xdid -s dcx 4 $ctime(3rd July 2006) $ctime |
| Note. |
/xdid -t |
This command lets you set the current day. |
Syntax: |
/xdid -t [DNAME] [ID] [TIMESTAMP] |
Example: |
/xdid -t dcx 4 $ctime(3rd July 3006) |
$xdid() Properties |
The $xdid identifier is a given mIRC alias that communicates with the DCX DLL to extract information in DCX controls. |
$xdid().border |
This property lets you retreive the size of the controls border in pixels. |
Syntax: |
$xdid(dialog, ID).border |
Example: |
$xdid(dcx, 4).border |
$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().count |
This property lets you retreive the number of calendars. |
Syntax: |
$xdid(dialog, ID).count |
Example: |
$xdid(dcx, 4).count |
$xdid().firstdayofweek |
This property lets you retreive the currently set first day of the week and if that is the OS setting. |
Syntax: |
$xdid(dialog, ID).firstdayofweek |
Example: |
$xdid(dcx, 4).firstdayofweek |
| Note. Returns: [1|0] [DAY] |
$xdid().range |
This property lets you retreive the calendar date range. |
Syntax: |
$xdid(dialog, ID).range |
Example: |
$xdid(dcx, 4).range |
| Note. nolimit is returned when the calendar range is not bounded. |
$xdid().sel |
This property lets you retreive the currently selected ctime. (does not work on multiselect controls) |
Syntax: |
$xdid(dialog, ID).sel |
Example: |
$xdid(dcx, 4).sel |
$xdid().selcount |
This property lets you retreive the maximum number of selectable days. |
Syntax: |
$xdid(dialog, ID).selcount |
Example: |
$xdid(dcx, 4).selcount |
$xdid().text |
This property lets you retreive the selected date range as plain text. |
Syntax: |
$xdid(dialog, ID).text |
Example: |
$xdid(dcx, 4).text |
$xdid().today |
This property lets you retreive the calendar current day date. |
Syntax: |
$xdid(dialog, ID).today |
Example: |
$xdid(dcx, 4).today |
$xdid().value |
This property lets you retreive the selected date range. |
Syntax: |
$xdid(dialog, ID).value |
Example: |
$xdid(dcx, 4).value |
$xdid().view |
This property lets you retreive the current view of the calander. |
Syntax: |
$xdid(dialog, ID).view |
Example: |
$xdid(dcx, 4).view |
Calendar Events |
These events are fired when activity occurs in the Calendar control. |
daystate |
When the month is JUST about to be shown. Return dates which you wish to be bolded. |
Syntax: |
/cb_alias DNAME daystate ID OFFSET_DATE |
Example: |
/cb_alias dcx daystate 4 1152622371 |
Parameters: |
OFFSET_DATE |
The date which is being presented to you. Each time a month is shown (eg. July), the daystate event will trigger for June, July, and August. |
Return | N,N,N...N Return a comma seperated string indicating the days to bold. | | Note.- This may seem difficult to figure out at first. Use $asctime() to determine which month is being requested by the Calendar control.
- The values returned are bolded. Returning 1,3,10 will bold the 1st, 3rd and 10th.
|
help |
Launched when you click on a control using the ? contexthelp button. |
Syntax: |
/cb_alias DNAME help ID |
Example: |
/cb_alias dcx help 4 |
sclick |
When a date is clicked. |
Syntax: |
/cb_alias DNAME sclick ID |
Example: |
/cb_alias dcx sclick 4 |
selchange |
When the date selection is changed. |
Syntax: |
/cb_alias DNAME selchange ID |
Example: |
/cb_alias dcx selchange 4 |
select |
When a new date is selected. |
Syntax: |
/cb_alias DNAME select ID START (END) |
Example: |
/cb_alias dcx select 4 1152622371 1152722371 |
Parameters: |
START |
The first date selected. |
END |
The last date selected. This is not sent unless multi style is specified. |
|