mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-02 09:39:39 +01:00
examples/dbeditmask: Fix crash due to incorrect dateseparator in some countries. Use default font instead of MS SansSerif.
git-svn-id: trunk@56226 -
This commit is contained in:
parent
e96879b669
commit
b33cda47a6
@ -8,16 +8,14 @@ object Form1: TForm1
|
|||||||
Caption = 'Test DBEdit with mask'
|
Caption = 'Test DBEdit with mask'
|
||||||
ClientHeight = 443
|
ClientHeight = 443
|
||||||
ClientWidth = 515
|
ClientWidth = 515
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'MS Sans Serif'
|
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '1.9.0.0'
|
LCLVersion = '1.9.0.0'
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 13
|
Height = 15
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 163
|
Width = 171
|
||||||
Caption = 'ADate Field - Mask: !99/99/00;1;_'
|
Caption = 'ADate Field - Mask: !99/99/00;1;_'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -68,7 +66,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object DateEdit: TDBEdit
|
object DateEdit: TDBEdit
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 19
|
Height = 23
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 246
|
Width = 246
|
||||||
CustomEditMask = True
|
CustomEditMask = True
|
||||||
@ -81,16 +79,16 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object ShowLongDateCheckBox: TCheckBox
|
object ShowLongDateCheckBox: TCheckBox
|
||||||
Left = 270
|
Left = 270
|
||||||
Height = 21
|
Height = 19
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 112
|
Width = 98
|
||||||
Caption = 'Show Full Date'
|
Caption = 'Show Full Date'
|
||||||
OnChange = ShowLongDateCheckBoxChange
|
OnChange = ShowLongDateCheckBoxChange
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object IntEdit: TDBEdit
|
object IntEdit: TDBEdit
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 19
|
Height = 23
|
||||||
Top = 80
|
Top = 80
|
||||||
Width = 246
|
Width = 246
|
||||||
CustomEditMask = True
|
CustomEditMask = True
|
||||||
@ -103,15 +101,15 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 13
|
Height = 15
|
||||||
Top = 64
|
Top = 64
|
||||||
Width = 51
|
Width = 50
|
||||||
Caption = 'AInt Field'
|
Caption = 'AInt Field'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object DBEdit1: TDBEdit
|
object DBEdit1: TDBEdit
|
||||||
Left = 271
|
Left = 271
|
||||||
Height = 19
|
Height = 23
|
||||||
Top = 80
|
Top = 80
|
||||||
Width = 193
|
Width = 193
|
||||||
CustomEditMask = True
|
CustomEditMask = True
|
||||||
@ -124,9 +122,9 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 270
|
Left = 270
|
||||||
Height = 13
|
Height = 15
|
||||||
Top = 64
|
Top = 64
|
||||||
Width = 100
|
Width = 95
|
||||||
Caption = 'AStr Field (Phone)'
|
Caption = 'AStr Field (Phone)'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
|||||||
@ -53,6 +53,7 @@ uses
|
|||||||
procedure TForm1.FormCreate(Sender: TObject);
|
procedure TForm1.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
DefaultFormatSettings.ShortDateFormat := 'd/m/yyyy';
|
DefaultFormatSettings.ShortDateFormat := 'd/m/yyyy';
|
||||||
|
DefaultFormatSettings.DateSeparator := '/';
|
||||||
if not FileExistsUTF8(Dbf1.TableName) then
|
if not FileExistsUTF8(Dbf1.TableName) then
|
||||||
begin
|
begin
|
||||||
Dbf1.FieldDefs.Clear;
|
Dbf1.FieldDefs.Clear;
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Options>
|
<Options>
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user