Recent

Author Topic: TMaskEdit Format ?  (Read 2708 times)

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
TMaskEdit Format ?
« on: September 24, 2017, 07:14:36 am »
Hi

i use TMaskEdit for show data.

in PC1 , "FormatSettings.DateSeparator" char is "-" (windows DateSeparator" char is "-") and in PC2  "FormatSettings.DateSeparator" char is "/".

i write my code in PC2 and create EXE file.

my file work in PC2 and show correctly data (2017/09/24)but in PC1 does't show correctly(__-__-2017) and occur Error?

how can i solved it?

thank you


ASerge

  • Hero Member
  • *****
  • Posts: 2212
Re: TMaskEdit Format ?
« Reply #1 on: September 24, 2017, 04:50:14 pm »
how can i solved it?
:) Obviously, what to fix the code, especially since you already know where to look for the problem.

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: TMaskEdit Format ?
« Reply #2 on: September 25, 2017, 10:38:54 am »
Hi

i have an EXE file.

i run it in PC1.when i run it , i see "-" in the MaskEdit .

but when i runt it in PC2 , i see "/" in the MaskEdit?

Why??!?!

i always want to see "/"  in the MaskEdit

how can i do that?

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: TMaskEdit Format ?
« Reply #3 on: September 26, 2017, 02:15:45 am »
The Date separator Is part of the OS configuration. You can change there or
you can change it directly I guess.
 
 FormatSettings.DateSeparator := '/';

If you don't want to change your settings in the PC then you should be able
to do as above during your program initiation steps.
The only true wisdom is knowing you know nothing

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: TMaskEdit Format ?
« Reply #4 on: September 26, 2017, 05:53:54 am »

 FormatSettings.DateSeparator := '/';


@jamie Thank you

PatBayford

  • Full Member
  • ***
  • Posts: 125
Re: TMaskEdit Format ?
« Reply #5 on: September 26, 2017, 07:32:25 am »
By default, these conversions/format operators use the separators set in the OS (the Locale settings). If you need non-standard entries, then you will have to enter them by hand for each control.
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)

 

TinyPortal © 2005-2018