Forum > LCL

Why not...

(1/2) > >>

egsuh:
add NumberOnly property to TLabeledEdit like TEdit?

Or, is it difficult to make TDBLabeledEdit, or TRTTILabeledEdit?

JuhaManninen:
AFAIK TLabeledEdit is there mostly for Delphi VCL compatibility.
It works poorly with the LCL's anchor system. Better use a separate TLabel and anchor it with a desired type of edit control.

Bart:

--- Quote from: egsuh on April 01, 2024, 04:28:10 am ---add NumberOnly property to TLabeledEdit like TEdit?

Or, is it difficult to make TDBLabeledEdit, or TRTTILabeledEdit?

--- End quote ---

Since this component inherits from TCustomEdit, it already has a NumbersOnly property.
I published it in commit 76182b6c and put it up for merging to fixes_3 branch.

Bart

wp:
However, NumbersOnly is not very useful. You cannot even enter neither a '-' for negative values nor a decimalseparator for floating point numbers. Simply: don't use it. Use a SpinEdit (FloatSpinEdit) or - if you don't like the spinner buttons - TSpinEditEx (TFloatSpinEditEx) with UpdownVisible=false.

Bart:

--- Quote from: wp on April 01, 2024, 12:42:12 pm ---However, NumbersOnly is not very useful.

--- End quote ---
Yet another thing we needed because Delphi has it (because Windows has it, but implemented it in a dumb-ass manor).
I'm sorry to say I ported it to Lazarus  :-[

Fortunately it is off by default.

Navigation

[0] Message Index

[#] Next page

Go to full version