Recent

Author Topic: Decimal separator  (Read 6106 times)

Edu

  • Guest
Decimal separator
« on: April 26, 2005, 12:27:24 am »
Is it possible to change the numeric decimal separator (VK_DECIMAL) for the entire application?
In Delphi I can do this with ApplicationEvents:

procedure TForm.ApplicationEventsMessage(var Msg: tagMSG;
  var Handled: Boolean);
begin
  if (Msg.message = WM_KEYDOWN) and
  (Msg.wParam = VK_DECIMAL) and
  (Odd(GetKeyState(VK_NUMLOCK))) and
  (DecimalSeparator = ',') then
  Msg.wParam := 188;
end;

Thanks,

Edu

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2663
Decimal separator
« Reply #1 on: April 26, 2005, 06:51:20 pm »
I don't think that it will be supported
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Lightning

  • Sr. Member
  • ****
  • Posts: 422
Decimal separator
« Reply #2 on: April 29, 2005, 04:31:51 pm »
Don't use windows specific things, even Delphi has some global variable/structure for this, can't remember exactly the name ...
The future must be... Fast and OpenSource so...
Think Open and Lightning Fast!

Anonymous

  • Guest
Decimal separator
« Reply #3 on: May 10, 2005, 06:56:50 pm »
In Delphi there are many system wide variables:


var CurrencyString: string;
var CurrencyFormat: Byte;
var NegCurrFormat: Byte;
var ThousandSeparator: Char;
var DecimalSeparator: Char;
var CurrencyDecimals: Byte;
var DateSeparator: Char;
var ShortDateFormat: string;
var LongDateFormat: string;
var TimeSeparator: Char;
var TimeAMString: string;
var TimePMString: string;
var ShortTimeFormat: string;

var LongTimeFormat: string;
var ShortMonthNames: array[1..12] of string;
var LongMonthNames: array[1..12] of string;
var ShortDayNames: array[1..7] of string;
var LongDayNames: array[1..7] of string;

var SysLocale: TSysLocale;
var EraNames: array[1..7] of string;
var EraYearOffsets: array[1..7] of Integer;
var TwoDigitYearCenturyWindow: Word = 50;

var TListSeparator: Char;


Would you be so kind to tell us where we can find similiar variables in  Lazarus  ?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2663
Decimal separator
« Reply #4 on: May 11, 2005, 12:02:50 pm »
grep ? find in files ?
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018