Numeric InputMask

Moderator: Rathinagiri

Post Reply
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Numeric InputMask

Post by l3whmg »

Hi everyone,
perhaps I don't understand very well documentation :cry: , but with

Code: Select all

...TEXTBOX...DATATYPE NUMERIC...INPUTMASK...FORMAT...
I have some problem when I want use Italian ;) (Spain, French, etc.) style.
I've included a source to better explain.
In other words:
A) On first time you open the form, in english style you can see ".000", but in italian style (my syntax clause is wrong/correctly :?: ) you see nothing.
B) I can't use comma, as first character, to enter a value like this 0.345 (english style); while is 0,345 (italian style).
C) dot and comma appear and disappear if field got or lost focus.

Minigui Version: HMG 3.0.0 Forum Text XVIII (2010.01.21)
SysOp: MsWinXp

Many thanks for any help! :D
Attachments
test.zip
source
(1.21 KiB) Downloaded 431 times
Luigi from Italy
www.L3W.it
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Numeric InputMask

Post by Roberto Lopez »

l3whmg wrote:Hi everyone,
perhaps I don't understand very well documentation :cry: ,
If I've not missed something from your post, the behavior you've described is by design.

Please, look at the sample: \hmg\samples\inputmask.1.

The last textbox shows the case you've pointed:

Code: Select all

		@ 410,10 TEXTBOX Text_11 ;
			VALUE 1234.56 ;
			NUMERIC INPUTMASK "99,999.99" FORMAT 'E'

The mask must ALWAYS specify decimals as points and thousand separators as commas.

When you use FORMAT "E", the comma and point are inverted for DISPLAY PURPOSES ONLY.

To enter the data you must always use POINT as decimal separator.

My native tongue is Spanish, I use Spanish language Windows version and I have a Spanish keyboard.

My Spanish keyboard has a point as decimal separator in the numeric keypad.

The Windows calculator accept points as decimals and shows commas too (as FORMAT 'E' does).

The only difference with HMG is that, the calculator accepts comma from (left side of) keyboard too. This could be a nice modification to do. It is in my TO DO list already.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: Numeric InputMask

Post by l3whmg »

Hi Roberto,
you are right! I have understand better now. It will be an interesting evolution the ability to enter numbers like Italian style.

I suggest another trend? In some case, it's a good thing see also the "+"; yes, I know, without sign it's obviously the number is positive, but... Example: I have created a program for an optician and he expressed the wish to see also the positive sign because it's important to understand immediatly the difference.
Is it possible to add an option, to the InputMask (and the edit event too), to solve this (ex. "+999,999.999")?

Best regards, many thanks for your quickly answer and job.
Luigi from Italy
www.L3W.it
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Numeric InputMask

Post by Roberto Lopez »

l3whmg wrote: I suggest another trend? In some case, it's a good thing see also the "+"; yes, I know, without sign it's obviously the number is positive, but... Example: I have created a program for an optician and he expressed the wish to see also the positive sign because it's important to understand immediatly the difference.
Is it possible to add an option, to the InputMask (and the edit event too), to solve this (ex. "+999,999.999")?

Best regards, many thanks for your quickly answer and job.
In the current HMG release you could attempt to handle '+' using a character textbox.

Please look at \hmg\samples\inputmask.2
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Numeric InputMask

Post by Rathinagiri »

Fantastic :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Numeric InputMask

Post by mustafa »

Hello Roberto
Regarding issue raised Luigi
Some time ago I also raised the problem in
part of Europe with the decimal € area for bills
decimals are issued with "," not with the "."
It occurred to me to do some tests on the total bill
LABEL a value and I've only got half results
at the top of the screen printing is not the
Numeric InputMask "99,999,999,999.99 €" FORMAT 'E'
and at the bottom you can see that the TextBox Total
is correct as of the semicolons with the € symbol
LABEL instead on three samples there Ax, Bx, Cx
has been achieved partly results

*--------------------------------------*

Hola Roberto
Referente a tema que ha planteado Luigi
Yo tambien hace algun tiempo plantee el problema que existe en
la parte de Europa Zona € con los decimales pues las facturas
se emiten con decimales con la "," no con el "."
Se me ocurrio hacer algunas pruebas en poner el Total de una factura
en un valor LABEL y solo he conseguido el resultado a medias
en la parte superior de la impresion de pantalla es sin el Numeric INPUTMASK "99,999,999,999.99 €" FORMAT 'E'
y en la parte inferior se puede observar que en el Total del TEXTBOX
se ve correcto la forma de los puntos y comas con el simbolo del €
en Cambio en los LABEL que hay tres muestras Ax, Bx,Cx
se ha conseguido parcialmente los resultados

Mustafa
Attachments
Prix.zip
(715.08 KiB) Downloaded 429 times
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Numeric InputMask

Post by mustafa »

A screenshot :oops:
Attachments
Screen.jpg
Screen.jpg (38.88 KiB) Viewed 7355 times
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Numeric InputMask

Post by mustafa »

Hello Roberto
It is these very busy, but the issue of the decimal comma instead of
I point that works very well in the TextBox with the formula is added
At InputMask NUMERIC field "€ 9,999,999.99" FORMAT 'E'.

Anyway I've experienced a bit as would be the result in a LABEL
I made it to look like in the textbox, but never exceeding the number of
€ 999,999.00 since I've only managed to replace "," by "." And vice versa.

In the Browse is not the figures that would have to carry "," I experienced
A little and in the Browse is more complicated but I think you could do in deception
Has been achieved in the LABEL and the numbers are not in column.

Another issue alien has this problem is that I could not get in the column of
Total amount to be placed just before you save it in the record sum
Total attached a picture I have placed a screen with fiction as would
To be, not whether the formula of European format has been experienced in €
Printer is an issue that worries me very much because here in the European Community
If an application is made has to carry the book. “.” And “,” instead.

Excuse me for bothering teacher, a warm greeting

*---------------------------------------*
Hola Roberto
Ya se que estas muy ocupado, pero el tema de los decimales con la coma en vez del
Punto veo que funciona muy bien en los TEXTBOX con la formula que se le añade
Al campo NUMERIC INPUTMASK "9,999,999.99 €" FORMAT 'E'.

De todas formas he experimentado un poco como quedaría el resultado en un LABEL
He logrado que se vea como en el TEXTBOX siempre que no sobrepase la cifra de
999.999,00 € pues solo he conseguido remplazar la “,” por el”.” y viceversa .

En los Browse tampoco se ve las cifras que tendrían que llevar “,” he experimentado
Un poco y en el Browse es más complicado pero creo que se podría hacer en engaño
Que se ha conseguido en el LABEL y los números tampoco se ven en columna.

Otro tema ajeno ha este problema es que no he conseguido que en la columna de los
Totales se coloque la suma anterior solo consigo que se salve en el registro la suma
Total en una imagen anexa he colocado un Pantallaza con la ficción como tendria
Que ser, no se si la formula de formato Europeo del € se ha experimentado en
Impresora, es un tema que me preocupa mucho pues aquí en la Comunidad Europea
Si se hace alguna aplicación contable tiene que llevar los “.” Y las “,” en su lugar.

Perdone maestro por molestarle, un cordial saludo

Mustafa
Attachments
PrixE.zip
(733.23 KiB) Downloaded 466 times
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: Numeric InputMask

Post by mustafa »

Un Screen
Attachments
Screen.jpg
Screen.jpg (53.92 KiB) Viewed 7335 times
Post Reply