mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 11:48:10 +02:00
DbEditMask example: Fix ShortDateFormat, it raised an exception.
git-svn-id: trunk@54833 -
This commit is contained in:
parent
497a08de97
commit
2a1891258d
@ -12,7 +12,7 @@ object Form1: TForm1
|
||||
Font.Name = 'MS Sans Serif'
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.5'
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Label3: TLabel
|
||||
Left = 8
|
||||
Height = 13
|
||||
@ -68,7 +68,7 @@ object Form1: TForm1
|
||||
end
|
||||
object DateEdit: TDBEdit
|
||||
Left = 8
|
||||
Height = 21
|
||||
Height = 19
|
||||
Top = 32
|
||||
Width = 246
|
||||
CustomEditMask = True
|
||||
@ -81,16 +81,16 @@ object Form1: TForm1
|
||||
end
|
||||
object ShowLongDateCheckBox: TCheckBox
|
||||
Left = 270
|
||||
Height = 19
|
||||
Height = 21
|
||||
Top = 32
|
||||
Width = 92
|
||||
Width = 112
|
||||
Caption = 'Show Full Date'
|
||||
OnChange = ShowLongDateCheckBoxChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object IntEdit: TDBEdit
|
||||
Left = 8
|
||||
Height = 21
|
||||
Height = 19
|
||||
Top = 80
|
||||
Width = 246
|
||||
CustomEditMask = True
|
||||
@ -105,13 +105,13 @@ object Form1: TForm1
|
||||
Left = 8
|
||||
Height = 13
|
||||
Top = 64
|
||||
Width = 44
|
||||
Width = 51
|
||||
Caption = 'AInt Field'
|
||||
ParentColor = False
|
||||
end
|
||||
object DBEdit1: TDBEdit
|
||||
Left = 271
|
||||
Height = 21
|
||||
Height = 19
|
||||
Top = 80
|
||||
Width = 193
|
||||
CustomEditMask = True
|
||||
@ -126,7 +126,7 @@ object Form1: TForm1
|
||||
Left = 270
|
||||
Height = 13
|
||||
Top = 64
|
||||
Width = 85
|
||||
Width = 100
|
||||
Caption = 'AStr Field (Phone)'
|
||||
ParentColor = False
|
||||
end
|
||||
|
@ -52,7 +52,7 @@ uses
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ShortDateFormat := 'd/M/yyyy';
|
||||
DefaultFormatSettings.ShortDateFormat := 'd/m/yyyy';
|
||||
if not FileExistsUTF8(Dbf1.TableName) then
|
||||
begin
|
||||
Dbf1.FieldDefs.Clear;
|
||||
@ -112,7 +112,7 @@ var
|
||||
begin
|
||||
DateField := Dbf1.FieldByName('ADate') as TDateTimeField;
|
||||
if ShowLongDateCheckBox.Checked then
|
||||
DateField.DisplayFormat := LongDateFormat
|
||||
DateField.DisplayFormat := DefaultFormatSettings.LongDateFormat
|
||||
else
|
||||
DateField.DisplayFormat := '';
|
||||
end;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="10"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
@ -9,9 +9,6 @@
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
@ -24,7 +21,7 @@
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user