wCalendarCtrl

The calendar control allows the user to pick a date.

Appearance:
Superclass:wControl
Styles:
StylesDescription
wCalSundayFirstShow Sunday as the first day in the week.
wCalMondayFirstShow Monday as the first day in the week.
wCalNoTodayDoes not display the "today" date at the bottom of the control.
wCalNoMonthChangeDisable the month (and, implicitly, the year) changing.
wCalShowWeekNumbersShow week numbers on the left side of the calendar.
wCalMultiSelectEnables the user to select a range of dates within the control.
Events:wCommandEvent
wCommandEventDescription
wEvent_CalendarSelChangedThe selected date changed.
wEvent_CalendarViewChangedThe control view changed.

Consts

wCalSundayFirst = 0
wCalMondayFirst = 1152921504606846976
wCalNoToday = 0x00000010
wCalNoMonthChange = 2305843009213693952
wCalShowWeekNumbers = 0x00000004
wCalMultiSelect = 0x00000002

Procs

proc getDate(self: wCalendarCtrl): wTime {...}{.validate, property, raises: [], tags: [].}
Gets the currently selected date. Gets the currently selected date range.
proc setDate(self: wCalendarCtrl; time: wTime) {...}{.validate, property, raises: [], tags: [].}
Sets the current date.
proc setDates(self: wCalendarCtrl; time1: wTime; time2: wTime) {...}{.validate, property,
    raises: [], tags: [].}
Sets the selected date range. Sets the selected date range.
proc getToday(self: wCalendarCtrl): wTime {...}{.validate, property, raises: [], tags: [].}
Retrieves the date information for the date specified as "today"
proc setToday(self: wCalendarCtrl; time: wTime) {...}{.validate, property, raises: [],
    tags: [].}
Sets the "today" value. If the control had been previously limited to a range of dates, returns the lower and upper bounds of this range.
proc setDateRange(self: wCalendarCtrl; time1 = wDefaultTime; time2 = wDefaultTime) {...}{.
    validate, property, raises: [], tags: [].}
Sets the valid range for the date selection. Sets the valid range for the date selection.
proc enableMonthChange(self: wCalendarCtrl; flag = true) {...}{.validate, raises: [], tags: [].}
Enable or Disable the month changing.
proc setMaxSelectCount(self: wCalendarCtrl; max: int) {...}{.validate, property, raises: [],
    tags: [].}
Sets the maximum number of days that can be selected.
proc getMaxSelectCount(self: wCalendarCtrl): int {...}{.validate, property, raises: [],
    tags: [].}
Retrieves the maximum date range that can be selected
proc final(self: wCalendarCtrl) {...}{.raises: [], tags: [].}
Default finalizer for wCalendarCtrl.
proc init(self: wCalendarCtrl; parent: wWindow; id = wDefaultID; date = wDefaultTime;
         pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0) {...}{.validate,
    raises: [], tags: [].}
Initializer.
proc CalendarCtrl(parent: wWindow; id = wDefaultID; date = wDefaultTime;
                 pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0): wCalendarCtrl {...}{.
    inline, discardable, raises: [], tags: [].}
Creates the control.
ParametersDescription
parentParent window.
idThe identifier for the control.
dateThe initial value of the control, if an invalid date (such as the default value) is used, the control is set to today.
posInitial position.
sizeInitial size. If left at default value, the control chooses its own best size.
styleThe window style.

Methods

method getBestSize(self: wCalendarCtrl): wSize {...}{.property, raises: [], tags: [].}
Returns the best acceptable minimal size for the control.
method getDefaultSize(self: wCalendarCtrl): wSize {...}{.property, inline, raises: [],
    tags: [].}
Returns the default size for the control.