[Lazarus] New NumbersOnly property for TCustomEdit (r43678)

Frank Poretzky poretzky at nym.mixmin.net
Thu Jan 23 00:50:23 CET 2014


On Wed, 22 Jan 2014 11:43:49 -0200, Alexsander Rosa wrote:

>2014/1/22 Mattias Gaertner <nc-gaertnma at netcologne.de>
>
>>
>> > Frank Poretzky <poretzky at nym.mixmin.net> hat am 22. Januar 2014 um 13:12
>> > geschrieben:
>> >
>> > On Sat, 11 Jan 2014 13:57:48 +0100, Bart wrote:
>> >
>> > >Personally I would go for a T(Float)SpinEdit rather than a MaskEdit.
>> >
>> > Yes, that's the easiest way to control range-bound number input. It
>> > just lacks an option to get rid of those spacious up/down elements.
>> > Any chance to get that done?
>>
>> A TSpinEdit without spins elements?
>> Why not use TEdit?

You're right, that sounds weird. But why extend a TEdit and add
Min-/Max-/Value properties including all the logistics behind them to
get what the Float-/SpinEdit controls already offer?

>Frank, are you complaining about the SIZE of the arrows?
>Maybe you need smaller ones (or a property to set their size).

Sometimes I'd like to have them completely removed, not least to gain
space.

Think of a 2-dimensional matrix of numbers, which have to be observed
though hardly changed, where it may be disturbing to see all those
values separated by spacious arrows.

And for what reason do I need gradual ups and downs when entering a
TCP port number, where there's no logical neighborhood between most of
them and keyboard usage is the only sufficient way to change a value
(SMTP ports: ..25..465..587..65535)? In those frequent cases offering
arrows looks like a joke.

A single boolean ShowArrows property or, following your idea, an
integer ArrowsWidth property with '0' removing it completely would
solve that problem preserving a coherent codebase.

Frank




More information about the Lazarus mailing list