diff --git a/jvcl/run/JvCalc.pas b/jvcl/run/JvCalc.pas index d28c524dd4..407795a2f4 100644 --- a/jvcl/run/JvCalc.pas +++ b/jvcl/run/JvCalc.pas @@ -98,6 +98,7 @@ TJvCalculatorForm = class(TJvForm) FDisplayLabel: TLabel; FPasteItem: TMenuItem; FParentWnd: HWND; + procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure FormKeyPress(Sender: TObject; var Key: Char); procedure PopupMenuPopup(Sender: TObject); procedure CopyItemClick(Sender: TObject); @@ -307,7 +308,7 @@ function CreateCalcBtn(AParent: TWinControl; AKind: TCalcBtnKind; const BtnCaptions: array [cbSgn..cbMC] of string = ('', ',', '/', '*', '-', '+', 'sqrt', '%', '1/x', '=', '<-', 'C', - 'MP', 'MS', 'MR', 'MC'); + 'M+', 'M-', 'MR', 'MC'); begin Result := TJvCalcButton.CreateKind(AParent, AKind); with Result do @@ -491,6 +492,7 @@ function TJvCalculator.Execute(ParentWnd: HWND): Boolean; try Ctl3D := not FFlat; Caption := Self.Title; + Scaled := True; TJvCalculatorPanel(FCalcPanel).FMemory := Self.FMemory; TJvCalculatorPanel(FCalcPanel).UpdateMemoryLabel; TJvCalculatorPanel(FCalcPanel).FPrecision := Max(2, Self.Precision); @@ -554,6 +556,7 @@ constructor TJvCalculatorForm.Create(AOwner: TComponent); Items: array [0..1] of TMenuItem; begin inherited CreateNew(AOwner, 0); // for BCB + Color := clWindow; BorderIcons := [biSystemMenu]; BorderStyle := bsDialog; PixelsPerInch := 96; @@ -566,7 +569,8 @@ constructor TJvCalculatorForm.Create(AOwner: TComponent); Position := poOwnerFormCenter; {$ELSE} Position := poScreenCenter; - {$ENDIF COMPILER7_UP}; + {$ENDIF COMPILER7_UP}; + OnKeyDown := FormKeyDown; OnKeyPress := FormKeyPress; Items[0] := NewItem(RsCopyItem, scCtrl + VK_INSERT, False, True, CopyItemClick, 0, ''); Items[1] := NewItem(RsPasteItem, scShift + VK_INSERT, False, True, PasteItemClick, 0, ''); @@ -579,7 +583,7 @@ constructor TJvCalculatorForm.Create(AOwner: TComponent); begin Align := alClient; Parent := Self; - BevelOuter := bvLowered; + BevelOuter := bvNone; ParentColor := True; PopupMenu := Popup; end; @@ -676,6 +680,14 @@ procedure TJvCalculatorForm.DisplayChange(Sender: TObject); TJvCalculator(Owner).DisplayChange; end; +procedure TJvCalculatorForm.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); +begin + inherited; + + if (Key = VK_END) or (Key = VK_INSERT) then + ModalResult := mrOK; +end; + procedure TJvCalculatorForm.FormKeyPress(Sender: TObject; var Key: Char); begin TJvCalculatorPanel(FCalcPanel).CalcKeyPress(Sender, Key); diff --git a/jvcl/run/JvToolEdit.pas b/jvcl/run/JvToolEdit.pas index 1d07e370cc..44fee06435 100644 --- a/jvcl/run/JvToolEdit.pas +++ b/jvcl/run/JvToolEdit.pas @@ -88,7 +88,7 @@ interface function GetOptions(var dwFlag: DWORD): HRESULT; stdcall; end; {$EXTERNALSYM IAutoComplete2} - + // To avoid ambiguities, we include shldisp.h and define the _di_ interfaces ourselves {$HPPEMIT '#include "shldisp.h"'} {$HPPEMIT 'typedef DelphiInterface _di_IAutoComplete;'} @@ -1020,7 +1020,7 @@ TJvDateEdit = class(TJvCustomDateEdit) property DateAutoBetween; property MinDate; property MaxDate; - property Align; + property Align; property Action; property AutoSelect; property AutoSize; @@ -1999,6 +1999,9 @@ function TJvCustomComboEdit.BtnWidthStored: Boolean; procedure TJvCustomComboEdit.ButtonClick; begin + if Assigned(FPopup) then + TJvPopupWindow(FPopup).Font.Assign(Font); + if Assigned(FOnButtonClick) then FOnButtonClick(Self); @@ -4593,7 +4596,7 @@ procedure TJvEditButton.Paint; DrawState := FState; if FPopupVisible then DrawState := rbsDown; - + Details.Part := DP_SHOWCALENDARBUTTONRIGHT; if not Enabled then @@ -5418,4 +5421,4 @@ finalization UnregisterUnitVersion(HInstance); {$ENDIF UNITVERSIONING} -end. +end. \ No newline at end of file