From a80c5252e07689350e92105ca0fb8bc0fc4fb6b0 Mon Sep 17 00:00:00 2001 From: Bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Wed, 19 Jan 2022 13:50:23 +0100 Subject: [PATCH] TFloatSpinEditEx: don't publish property NumbersOnly. It is useless for this control and confuses users. --- components/lazcontrols/spinex.inc | 6 ++++++ components/lazcontrols/spinex.pp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/lazcontrols/spinex.inc b/components/lazcontrols/spinex.inc index 9647afa0ea..5ca8bab5fd 100644 --- a/components/lazcontrols/spinex.inc +++ b/components/lazcontrols/spinex.inc @@ -543,6 +543,12 @@ begin UpdateControl; end; +class procedure TCustomFloatSpinEditEx.WSRegisterClass; +begin + inherited WSRegisterClass; + RegisterPropertyToSkip(TCustomFloatSpinEditEx, 'NumbersOnly', 'Should never have been published for this control.', ''); +end; + function TCustomFloatSpinEditEx.ValueToStr(const AValue: Double): String; var diff --git a/components/lazcontrols/spinex.pp b/components/lazcontrols/spinex.pp index ede01a7fae..083cf9131e 100644 --- a/components/lazcontrols/spinex.pp +++ b/components/lazcontrols/spinex.pp @@ -79,7 +79,7 @@ interface uses Classes, SysUtils, Math, // LCL - LCLType, LCLProc, Controls, ClipBrd, ComCtrls, GroupedEdit; + LCLType, LCLProc, Controls, ClipBrd, ComCtrls, GroupedEdit, LResources; {.$define debugspinex} @@ -220,6 +220,7 @@ type function SameValue(AValue1, AValue2: Double): Boolean; override; {$endif} procedure SetDecimals(ADecimals: Integer); virtual; + class procedure WSRegisterClass; override; public function ValueToStr(const AValue: Double): String; override; function KeyAllowed(Key: Char): Boolean; override; @@ -263,7 +264,6 @@ type property Hint; property Layout; property MaxLength; - property NumbersOnly; property ParentBiDiMode; property ParentColor; property ParentFont;