File Name.......: DatePk97.Zip File Version....: Version 4.5 File Description: Set of Date components: DateTime field with drop down calendar like '97. tCalendar97, tDbCalendar97, tDateEdit97, tDbDateEdit97, tDateFromTo97, and a property editor for all Date fields. Targets.........: Delphi 1, 2, 3, 4 & C++ Builder 1, 3. Author Name.....: BOURMAD Mehdi EMail...........: bourmad@multimania.com WEB.............: http://www.multimania.com/bourmad File Status.....: Freeware Category........: Application with source. (-----------------------------------------------------------------) As usual : Free to use and redistribute, but my name must appear somewhere in the source code, or in the software. No warranty is given by the author, expressed or implied. WARNING! THE CODE IS PROVIDED AS IS WITH NO GUARANTEES OF ANY KIND! USE THIS AT YOUR OWN RISK - YOU ARE THE ONLY PERSON RESPONSIBLE FOR ANY DAMAGE THIS CODE MAY CAUSE - YOU HAVE BEEN WARNED! (-----------------------------------------------------------------) Files : Sources ------- DtReg97.* : file for Register components. Install this one in Delphi. DtCal97.* : contains tCalendar97 component. DtCaDB97.* : contains tDBCalendar97 component. DtPop97.* : contains popup calendar file. DtProp97.* : contains property editor for dates. DtEdit97.* : contains tDateEdit97 component. DtEdDB97.* : contains tDBDateEdit97 component. DtEdFT97.* : contains tDateFromTo97 component. DtFunc97.* : unit containing internal functions. DtMisc97.* : unit containing internal types and variables. BmBmp.* : global unit used in some of my components (bitmap management). Resources Files --------------- DtReg97.d* : resources files for components library. DtCal97.r* : resources files for calendar. DtEdit97.r* : resources files for buttons's bitmaps. DtEd97_b.r* : alternate resource files for button's bitmaps (replace DtEdit97.r*). How to use resources files -------------------------- you need to do nothing... *.R16 and *.D16 files are automatically included in 16 bits (Delphi1) *.R32 and *.D32 files are automatically included in 32 bits (D2, D3, D4, BCB1, BCB3) (-----------------------------------------------------------------) History : 18/01/99 - Version 4.5 : Now, Date property editor works, even if another date property editor is installed (RxLib, ...). Default value for Calendar component works correctly. Corrected problem with UseThreshold when date is lower than CenturyThreshold. 16bits border style not drawed when using 32bits compiler. Add default component editor when right-click or double-click on component. Minor changes. 17/10/98 - Version 4.4 : Add CenturyThreshold and UseThreshold properties. Let programmer choose if 2 digits dates are converted to current century, or to next one. Set correct date when changing to next month (31/01 to 28/02, ...). New property, let user choose number of days in a week-end 1 or 2, or more if you want! Publish ParentFont property. Changed ShortCuts properties. Now, use right shortcut type. Users of old version will have an warning when opening forms, ignore this warning message, and all will works correctly. Added doShowCancel option. Corrected problem when doIsMasked option is false. Now, you can use DateEdit without encapsulated editmask correctly. You can change days and monthes captions at runtime. Some changes in DbEdit97: data field is not modified if date has focus but isn't modified. Minor changes. 24/08/98 - Version 4.3 : Add properties Align, Color, Enabled. Now, if you enter an invalid date, the component try to correct it. It tries dd, ddmm, ... Update method works correctly when changing colors, ... in calendar component. Improve refresh method (less flickering). Correct problem "'' is not a valid date" with tDbDateEdit97 when erasing date. Correct problem when AutoEdit=false with tDbDateEdit97 when changing date. Replace uBmp file with BmBmp. Internal changes. 19/05/98 - Version 4.21 : Added missing file DtCal97.Res (16 & 32 bits version). 18/05/98 - Version 4.2 : Add component tDbCalendar97. Add properties PopupMenu and OnDblClick on tCalendar97. When click on header of calendar, display a popup menu for change month. Add week-number on calendar (with option for display or hide its column). New button on calendar going to "TODAY" (with option for display or hide button). Now, run correctly, even if system year is set with 2 digits. Minor changes. 26/03/98 - Version 4.1 : Correct some bugs from previous version. Add property StartOfWeekEnd. Musulmans can set it to thursday. Add property OnlyValidDates. When set to true, all non-valid dates are disabled. Add property OnlyMonth. When set to true, calendar component is used for select a date without days. Add property KeyRepeat. Set frequency of repeat when mouse is pressed. Add properties BorderStyle, BevelInner and BevelOuter for drawing border of calendar like you want :) 06/02/98 - Version 4.01 : Corrected bugs with Delphi 3 (maybe Delphi 2 too) : Popup is correctly displayed, Property Editor is correctly compiled, Error at design time is corrected. 25/01/98 - Version 4.0 : Sorry, I've renamed all files. So you need to delete old ones, and replace with these news. Added a new component tCalendar97, and a property Editor for Date fields. Publish Date property for all components (since you can use the property editor). Add events OnKeyUp, OnKeyDown, OnPress on tDateEdit97. Create a new property Options (gathering all options), a new property CalendarColors (gathering all colors for popup calendar), and a property ShortCuts. So, you may have errors when you open your forms. Don't worry. Rename DateValid by DateCorrect, SetDateValid by SetDateCorrect (avoid confusing with AddValidDate, ...). A lot of others changes... 03/01/98 - Version 3.6 : Correct bug when using a DateEdit (not DbDateEdit) with an empty field. 26/12/97 - Version 3.5 : Correct problems with the editmask when ShortDateFormat is with 2 digits years and when year is not the last field. Now, you can use this component with 2 or 4 digits year in your system date. Correct problem when day or month have only one number. Add property IsMasked to enable/disable editmask. 11/11/97 - Version 3.4 : Add an edit mask, properties for configure hotkeys. Resize resource bitmaps (13x13 pixels). Add new property EmptyAsToday. When set to true, an empty fieds is used like "today" date. 22/10/97 - Version 3.3 : Now compatible with C++ Builder (constant OBM_COMBO redefined). tDateEdit97 is now derived from tCustomEdit instead of tEdit. Add new color for Week-End dates. Reduce size of buttons bitmap. Add property PopupToday. If true, popup calendar always start with today's date. Keep focus when popup is hidden. Add new event OnAfterClick, called before popup calendar is shown. Add new button ValidateDate, and event OnValidateClick. New public functions SetValidDate (set date valid or invalid), AfterClick and ValidateDate calling associated events. Minor changes in Calpop97 source. Correct bugs (GPF) when ClearButton isn't used (CanClear=false). 23/09/97 - Version 3.2 : Add property ColorError (when date in invalid), and property FocusOnError (keep focus when date is invalid). Add property ButtonTabStop for enable or disable TabStop for Clear and Popup buttons, property ButtonStyle (bsNew, bsWin31, bsAutodetect) and property ButtonBorderStyle (bsSingle bsNone). Add About property in each components. Now, caption of tDateFromTo is hidden. Changed some functions in tDbDateEdit97 component, correcting some bugs with with keyboard usage. Correct bug with Enabled property. Change method to deactivate popup. 13/08/97 - Version 3.1 : This package is now compatible with C++ Builder. Add property IsModal, now you can show popup calendar as Modal or Modeless form. Add property CanPopup for enable or disable popup calendar button. Make public ClearDate and PopupCalendar procedures, so the date can be cleared and calendar popuped with program. Correct Delphi 2 problem with OBM_COMBO constant. Disable "mask" for entering dates manually because it's bugged. Now you can enter dates manually (but without validity check). When click on clear button, set focus to edit field. Redraw bitmaps for buttons. Enable/Disable buttons when Enable/Disable DateEdit component. Correct bug with events OnEnter and OnExit. Remove event OnDateChange, need to use OnChage. Some bugs correction with DateDB97 (and inherited field Date). 18/07/97 - Version 3.01 : Correct new bug with DbDateEdit97 : Field is not switched in EditMode when date change. Rename Calpop Unit to Calpop97 (frmCalPop to FrmCalPop97 component). 10/07/97 - Version 3.0 : Add a new component : tDateFromTo97, a panel with 2 DateEdit components. Popup calendar is now modeless. Now, you can close it by clicking anywhere in the screen. You can hit ALT+SPACE or ALT+ARROWKEY DOWN for open popup calendar. Add new properties ColorTitle, ColorDays, ColorArrow and rename ValidDateColor to ColorValidDate. Add new property ButtonDateStyle for choose between Calendar or DropDown bitmap for open popup. Can change CanClear property (visible or not) in design mode. Font attribules for popup calendar (font, size, ...) are herited from parent. Work around TWinControl.UpdateBounds bug. Thanks to Sam Liddicott. And some minor improvements and corrections... 20/05/97 - Version 2.1b : Add resource files for 32bits version. Other updates in previous release : Add property StartOfWeek for indicate begin of week in popup calendar. Correct height error of popup. Correct problem with highlighted date on MouseMove. Special Thanks to Claes Norreen for some updates. 18/05/97 - Version 2.1 : Add button for clear Date. From Popup calendar, add buttons for mavigate throught years, and for cancel edition. Can change caption for Month and Day. Added property CanClear for view (or not) Clear Button. 18/04/97 - Version 2.0 : Rename components to tDateEd97 and tDbDateEd97 (you need to remove the old components from your library). Add tDateEd97 and tDbDateEd97 in the same source file. Those components looks like '97 (mouse sensitive popup calendar). 24/03/97 - Version 1.0 : Primary version.