Rx Date DB Edit

RX Library

Control Name Unit Class
RX Date DB Edit RxDBCtrl TDBDateEdit

Description:
TDBDateEdit is a direct descendant of the TDateEdit and inherits all of its properties and methods. There are very few differences in the behavior of the TDBDateEdit and TDateEdit except that TDBDateEdit connects to a DataSource and allows visual manipulation of a Date or DateTime field.

TDBDateEdit provides three additional properties. The DataField, DataSource, and Field properties are exactly the same as the like-named properties in Delphi's standard data-aware components.

Using a TDBDateEdit component is very simple - assign a TDataSource to the DataSource property and assign a date or date-time field name to the DataField property. The TDBDateEdit control automatically gets the date from the data field and updates the data source with the changed data.

To control 2- or 4-digit year in TDateEdit, TDBDateEdit components you can use a typed boolean constant FourDigitYear from DateUtil unit.


Property BlanksChar
Declaration: BlanksChar: Char;

BlanksChar is the character used to represent unentered characters in the date mask (default value is space character - #32).


Property CalendarHints
Declaration: CalendarHints: TStrings;

CalendarHints provides a way to customize the Help Hints for the buttons on popup-calendar or calendar dialog.

Each button on calendar (prev year, prev month, next month, next year) has a default Help Hint.

CalendarHints allow the values of any or all of these default Help Hints to be replaced by customized hints.

CalendarHints is a string list. Each hint is a string. The first string in the string list becomes the Help Hint for the first button on the calendar (the "Prev Year" button). The 4-th hint becomes the Help Hint for the last 4-th button (the "Next Year" button).

When specifying CalendarHints at runtime, enter an empty string ('') for any Help Hint that should keep the default value. Simply leave the line blank when using the string list property editor of the Object Inspector for the CalendarHints property.


Property CalendarStyle
Declaration: CalendarStyle: TCalendarStyle;

The CalendarStyle property sets the different types of popup calendars. If the style is set to csDialog, then the popup calendar will take the form of a Dialog Box with captions and borders. The dialog's caption can be set by the DialogTitle property. If the style is set to csPopup (by default), then the calendar will appear as if it were a combo box. It will contain no title or borders. It will simply be the calendar. The PopupCalendarSize global variable from PickDate unit can be used to control the size of pop-up calendar.


Property CheckOnExit
Declaration: CheckOnExit: Boolean;

When True, if an invalid date value is entered in the TDateEdit or TDBDateEdit by the user, the exception will be raised when the user exits the date-editor.


Property Date
Declaration: Date: TDateTime;

This property (run-time only) determines the date that the TDateEdit displays. Assigning a value to Date causes the TDateEdit to display that date as its active date.


Property DefaultToday
Declaration: DefaultToday: Boolean;

If the DefaultToday property is True and the Date value is null (edit text is empty) or invalid then the current date is returneded by the Date property.


Property DialogTitle
Declaration: DialogTitle: string;

The DialogTitle property determines the text that appears in the pop-up dialog box's title bar.


Property PopupColor
Declaration: PopupColor: TColor;

The PopupColor is the background color of the pop-up calendar.


Property PopupVisible
Declaration: PopupVisible: Boolean;

PopupVisible (read-only and runtime-only property) specifies whether the popup-calendar is open or "dropped-down" (when CalendarStyle is csPopup). Read PopupVisible to determine whether the popup calendar is currently in the open (dropped-down) position.


Property StartOfWeek
Declaration: StartOfWeek: TDayOfWeekName;

StartOfWeek determines the day of the week that begins a week. This property determines which day of the week is drawn in the left column of the pop-up calendar.


Property WeekendColor
Declaration: WeekendColor: TColor;

WeekendColor determines the colors used for the pop-up calendar. It is the color set for the "free" days (weekends) in the month.


Property Weekends
Declaration: Weekends: TDaysOfWeek;

WeekEnds allows the programmer defines which days are weekends.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000