Please enable JavaScript to view this site.

A-Shell Development History

It is essentially the same as the calendar that appears in a date picker when you press the dropdown button, but is not associated with an input field, thus making it suitable to just place in a window/dialog as a convenience to the user in applications that involve dates (like scheduling). In comparison to the generic date/time dialog (the one you get by double-clicking on the system time display), this one has the advantage of being visually more compact, as well as providing some degree of application control. For example, you can:

generate a key click string/exitcode when the user changes the date
query or set the selected date (independent of the system date)
you can set limits on the range of dates that can be selected or displayed
highlight individual dates

To create a calendar control:

xcall AUI, AUI_CONTROL, CTLOP_ADD, id, ctext$, MBST_ENABLE, ctype, cmd$, func$, cstatus, srow, scol, erow, ecol, fgc, bgc, fontattr, fontscale, fontface$, tooltip$, parentid, "ASHMONTHCAL", winstyle, winstylex

See Operations for tips, examples and more information. Also see the new sample program MONCAL.BP in the EXLIB for a simple working example.

Parameters

Option

Description

ctext$

generally ignored when creating a calendar, unless you specify a WINSTYLE that creates a title bar (see below). CTEXT$ is however used with the CTLOP_CHG opcode to set the date or day states.

ctype

may be set to 0, unless you want to enable a click string, in which case specify the MBF_KBD flag.

cmd$

may specify a standard key click string (if MBF_KBD specified). If so, then clicking on a date will send the click string. Unless the MCS_DAYSTATES option is specified in WINSTYLE, advancing to another month does not trigger the click string.

func$

ignored

cstatus

standard return codes (0=ok)

position

See discussion below.

<ignored>

fgc, bgc, fontattr, fontscale, fontface$

tooltip$, parentid

work as usual.

winclass

must be specified as "ASHMONTHCAL". This replaces the fact that we didn't specify a control type in ctype.

winstyle

may be used to specify additional style options relating to the window wrapper for the control, as well as options specific to the calendar. See winstyle table for options, values and descriptions.

winstylex

may optionally have additional extended window styles: use ws_ex_topmost (&00000008) to force on top (of its siblings)