DateTimePicker: A Comment & Suggestion lazarus / 31-LCL ---------------------------------------------------------------------- mtrsoft · 2018-11-18 22:20 I'm using Lazarus 1.8.4 on a Win7/32 system. COMMENT: Most Comboboxes will display the dropdown list when the Alt+Down key combination is pressed. This key combination does not work with the DateTimePicker. -- OR am I missing somethting?) Creating a DateTimePicker descendant that overrides the KeyDown method does not work because the descendant needs to call the method/procedure DropDownCalendarForm and this method is not visible to the descendant. THE SUGGESTION: In the TDateTimePicker class (which is located in the datetimepicker.pas file) move the DropDownCalendarForm procedure from the "Private" section to the "Protected" section or the "Public" section. Doing this will make it possible to create a descendant that implements the Alt+Down functionality. A partial example of such a descendant is given in the following code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit mtrsDTPicker; { NOTE:  This unit depends on the procedure "DropDownCalendarForm" in DateTimePicker.pas  being moved from the "Private" to the "Protected" section of the source code  in the TCustomDateTimePicker class.  This change in "visiblity" is required so that this descendant can call the  DropDownCalendarForm procedure.} {$mode objfpc}{$H+} interface uses  Classes  //, SysUtils  , DateTimePicker  ; Type  TmtrDTPicker = Class(TDateTimePicker)  protected    procedure KeyDown(var Key: Word; Shift: TShiftState); override;  end; implementation Uses  Windows  {This is required so that the VK_DOWN constant is recognized.}  ; procedure TmtrDTPicker.KeyDown(var Key: Word; Shift: TShiftState);beginIf (Key = VK_DOWN) and (Shift = [ssAlt]) then  begin  Key := 0;  Shift := [];  If NOT DroppedDown then DropDownCalendarForm;  exit;  end; Inherited;end; end.  I have not checked the TdbDateTimePicker class, but assume that the above suggested change will automatically propigate to it. Regards, John ---------------------------------------------------------------------- wp · 2018-11-18 23:32 Makes sense. In Laz trunk the method is protected now. BTW: You should use "LCLType" (and in other cases also "LCLIntf", "LMessages", "LCLProc", instead of "Windows" and "Messages") so that your derived component is still cross-platform. ---------------------------------------------------------------------- Zoran · 2018-12-20 08:42 Sorry, I didn't notice this topic earlier. The described behaviour of Alt+Down key combination is now built in TDateTimePicker (in trunk). Also, Alt+Up now closes the calendar and returns focus to main control (also follows combo box behaviour). Thank you for noticing this.