Board index » delphi » Right adjustments of numbers in TEdit and TMaskEdit

Right adjustments of numbers in TEdit and TMaskEdit

Hi,

is there any possibility to get right adjustment of numerical
values in TEdit and TMaskEdit components. Adding spaces in front
of the numbers would be very complicated when using proportional
fonts. This must be a problem for more or less every Delphi
programmer.

Is there maybe other components which support right adjustment
that can be used?

 

Re:Right adjustments of numbers in TEdit and TMaskEdit


Quote
In article <3bc72b48$1_1@dnews>, Bengt Hakansson wrote:
> is there any possibility to get right adjustment of numerical
> values in TEdit and TMaskEdit components.

You have to make a descendent that overrides the CreateParams method
and adds the ES_RIGHT style to params.style. The main problem is that
it will not work on Win95 without also adding the ES_MULTILINE style.

I have posted example controls some time ago. go to
http://groups.google.com, http://www.mers.com/searchsite.html or
http://www.tamaracka.com/search.htm and search the newsgroups for
alignment AND ES_RIGHT and my name, that should turn them up.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

Other Threads