The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Using TMiniCal

The calendar component TMiniCal can be used in a straightforward manner. TMiniCal always displays a calendar sheet of the month given by the Date property. As an alternative to Date the properties Day, Month, and Year may be used to set or read the calendar.

The overall appearance of the calendar can be controlled by the color properties DayColors, ColorActiveMonth, ColorDayIdBg, ColorDayIdFg, ColorInactiveMonth, ColorSelectedBg, ColorSelectedFg, ColorWeekNoBg, ColorWeekNoFg, ColorHolidayBg, and ColorHolidayFg.

Further, the property Language controls the language which is used to display the names of the days, the months, and the holidays (as a hint - see below for details). The month name may be either displayed in full length or as a three-letter abbreviation (property ShowMonthShort). The first day of the week can be set by the property FirstDayOfWeek. The property MarkToday determines whether the "today" is indicated by a circle (of color ColorToday) around the day number of today.

The buttons at the top of the calendar sheet allow to switch the months and years by clicking them. Clicks to these buttons can be mimicked programmatically by using the methods NextMonth, NextYear, PrevMonth, and PrevYear. In addition, clicking the inactive region of the calendar sheet (that is the range of days which are not part of the current month) switches to the previous or next month if the property AutoSwitch is set to TRUE.

TMiniCal provides flexible support for indicating holidays, which are displayed using the colors defined by the properties ColorHolidayBg and ColorHolidayFg. In general, there are three classes of holidays: repeating holidays at fixed days in the year (e.g. XMas), non-repeating holidays (such as personal holidays at a particular date), and repeating holidays with movable dates (such as the Easter holidays). The first two classes can be controlled by the user by feeding the corresponding dates into TMiniCal using the methods AddHoliday and AddRepeatHoliday. The list of fixed repeating holidays contains a few pre-defined, typical European holidays. The user may change this by clearing the list using the method ClearHolidayList and rebuilding the list from scratch. All user-defined holidays can be retrieved by the method RetrieveHoliday.

The properties IndicateHolidays and ShowMovableHolidays control whether and which of the holidays are displayed. The name of a seleceted holiday may be displayed as a component hint if the ShowHolidayHint property is set to TRUE.

Finally the CheckHoliday method may be used to test whether a particular date is a holiday, and if so, obtain the name of that holiday.


Last Update: 2015-Jun-01