Page 1 of 2

Comma and decimal point as a decimal separator

Posted: Wed Feb 02, 2011 3:09 pm
by radohabjan
Hello friends,

I changed my old clipper programs with HMG and works perfectly except one problem: in Clipper (GET) you can use comma or decimal point ( same fiunctionality ) as a decimal separator , with HMG (TEXTBOX) is this possible just with decimal point. Slovenian keyboard has on numeric key pad instead of decimal point comma, so user can not use numeric key pad as normal.

It is possible to get this functionality in new releases ? Or is ther any other solution ?

Best regards Rado

Re: Comma and decimal point as a decimal separator

Posted: Wed Feb 02, 2011 10:14 pm
by Pablo César
Hi Rado,

I think you means a mask as format in a PICTURE. I believe there is already this format in pictures, please read this post: http://hmgforum.com/viewtopic.php?f=20& ... hilit=mask

And take a look in C:\hmg.3.0.35\SAMPLES\INPUTMASK.1 (last it is with comma)

Re: Comma and decimal point as a decimal separator

Posted: Thu Feb 03, 2011 12:25 pm
by radohabjan
Hello

as Roberto said :

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.


Slovenian language Windows and Slovenian keyboard has a COMMA instead of POINT in the numeric keypad. To enter the data you must always use POINT as decimal separator. In Clipper you can use both.

Best regards Rado

Re: Comma and decimal point as a decimal separator

Posted: Wed Feb 09, 2011 1:41 pm
by l3whmg
Hi Rado,
thi is a common problem (today) with HMG. There is an old request (from me and other) to solve this problem; the answer from Roberto was ASAP.
Best regard

Re: Comma and decimal point as a decimal separator

Posted: Sun Feb 20, 2011 9:27 am
by qres
Hi
The problem can be solved:)
at the beginning of the declaration:

Code: Select all

#xcommand ON KEY  DELNUM [ OF <parent> ] ACTION <action> ;
=> ;
_DefineHotKey ( <"parent"> , 0 , VK_DECIMAL , <{action}> )

#xcommand RELEASE KEY DELNUM OF <parent> ;
=> ;
_ReleaseHotKey ( <"parent"> , 0 , VK_DECIMAL   )

#xcommand STORE KEY DELNUM OF <parent> TO <baction> ;
=> ;
<baction> := _GetHotKey ( <"parent"> , 0 , VK_DECIMAL   )
then in the definition window:

Code: Select all

ON KEY DELNUM ACTION  _PushKey(190)
and the problem solved :)
Good luck ....

Re: Comma and decimal point as a decimal separator

Posted: Mon Feb 21, 2011 10:35 am
by l3whmg
Hi Qres,
many thanks! I'll try.

Cheers

Re: Comma and decimal point as a decimal separator

Posted: Fri May 13, 2011 12:52 pm
by mol
Great solution!
It works OK in TEXTBOXes, but... when I need to edit grid cell, it doesn't work. Rathi should help here.

Best regards, Marek

Re: Comma and decimal point as a decimal separator

Posted: Sun May 15, 2011 10:34 am
by mol
As I remember, new window is created during edition of grid. I think, this temporary window should inherit all ON KEY ACTION... settings.

Re: Comma and decimal point as a decimal separator

Posted: Mon May 16, 2011 4:30 am
by Rathinagiri
As you said, a new window is created for temporary editing. We have to grab the window handle of the temporary window.

Re: Comma and decimal point as a decimal separator

Posted: Tue May 31, 2011 11:58 am
by mol
I want to refresh this topic and put here a small program, which can be very useful for all who needs to swap coma and dot on numeric keypad.
please download it from http://www.molsystemy.pl/faktury/coma2dot.zip

I think Grigori Filatov can do such a program without any problems...

Grigori, please look at this sample.


You can start it:
coma2dot -k
for "dot mode"