DCX - Dialog Control Xtension
 
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!

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 style.
Syntax:
/xdid -k [DNAME] [ID] [+FLAGS] [COLOR]
Example:
/xdid -k dcx 4 +bi $rgb(255,0,255)
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).
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().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().selcount
This property lets you retreive the maximum number of selectable days.
Syntax:
$xdid(dialog, ID).selcount
Example:
$xdid(dcx, 4).selcount

$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

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.
ReturnN,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.

Contact � 2005-2009 Last Updated: 12th July, 09

Valid XHTML 1.0 Transitional Valid CSS!