Skip to content

Commit fd8afda

Browse files
Added support for Delphi 11
1 parent 84ed915 commit fd8afda

File tree

8 files changed

+207
-21
lines changed

8 files changed

+207
-21
lines changed

Demo/DBAwareLabeledComponentsDemo.dproj

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<ProjectGuid>{356F8995-048E-4B76-A115-41D00DD211C4}</ProjectGuid>
4-
<ProjectVersion>19.2</ProjectVersion>
4+
<ProjectVersion>19.3</ProjectVersion>
55
<FrameworkType>VCL</FrameworkType>
66
<Base>True</Base>
77
<Config Condition="'$(Config)'==''">Debug</Config>
@@ -124,17 +124,17 @@
124124
<DCCReference Include="..\Source\Vcl.DbAwareLabeledUtils.pas"/>
125125
<DCCReference Include="..\Source\Vcl.DbAwareLabeledConsts.pas"/>
126126
<DCCReference Include="..\Source\Vcl.BoundLabel.pas"/>
127-
<BuildConfiguration Include="Release">
128-
<Key>Cfg_2</Key>
129-
<CfgParent>Base</CfgParent>
130-
</BuildConfiguration>
131127
<BuildConfiguration Include="Base">
132128
<Key>Base</Key>
133129
</BuildConfiguration>
134130
<BuildConfiguration Include="Debug">
135131
<Key>Cfg_1</Key>
136132
<CfgParent>Base</CfgParent>
137133
</BuildConfiguration>
134+
<BuildConfiguration Include="Release">
135+
<Key>Cfg_2</Key>
136+
<CfgParent>Base</CfgParent>
137+
</BuildConfiguration>
138138
</ItemGroup>
139139
<ProjectExtensions>
140140
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
@@ -167,6 +167,16 @@
167167
<Operation>0</Operation>
168168
</Platform>
169169
</DeployClass>
170+
<DeployClass Name="AndroidClasses">
171+
<Platform Name="Android">
172+
<RemoteDir>classes</RemoteDir>
173+
<Operation>64</Operation>
174+
</Platform>
175+
<Platform Name="Android64">
176+
<RemoteDir>classes</RemoteDir>
177+
<Operation>64</Operation>
178+
</Platform>
179+
</DeployClass>
170180
<DeployClass Name="AndroidClassesDexFile">
171181
<Platform Name="Android">
172182
<RemoteDir>classes</RemoteDir>
@@ -468,6 +478,11 @@
468478
<Operation>1</Operation>
469479
<Extensions>.framework</Extensions>
470480
</Platform>
481+
<Platform Name="OSXARM64">
482+
<RemoteDir>Contents\MacOS</RemoteDir>
483+
<Operation>1</Operation>
484+
<Extensions>.framework</Extensions>
485+
</Platform>
471486
<Platform Name="Win32">
472487
<Operation>0</Operation>
473488
</Platform>
@@ -495,6 +510,11 @@
495510
<Operation>1</Operation>
496511
<Extensions>.dylib</Extensions>
497512
</Platform>
513+
<Platform Name="OSXARM64">
514+
<RemoteDir>Contents\MacOS</RemoteDir>
515+
<Operation>1</Operation>
516+
<Extensions>.dylib</Extensions>
517+
</Platform>
498518
<Platform Name="Win32">
499519
<Operation>0</Operation>
500520
<Extensions>.dll;.bpl</Extensions>
@@ -523,6 +543,11 @@
523543
<Operation>1</Operation>
524544
<Extensions>.dylib</Extensions>
525545
</Platform>
546+
<Platform Name="OSXARM64">
547+
<RemoteDir>Contents\MacOS</RemoteDir>
548+
<Operation>1</Operation>
549+
<Extensions>.dylib</Extensions>
550+
</Platform>
526551
<Platform Name="Win32">
527552
<Operation>0</Operation>
528553
<Extensions>.bpl</Extensions>
@@ -552,6 +577,10 @@
552577
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
553578
<Operation>0</Operation>
554579
</Platform>
580+
<Platform Name="OSXARM64">
581+
<RemoteDir>Contents\Resources\StartUp\</RemoteDir>
582+
<Operation>0</Operation>
583+
</Platform>
555584
<Platform Name="Win32">
556585
<Operation>0</Operation>
557586
</Platform>
@@ -1089,6 +1118,10 @@
10891118
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
10901119
<Operation>1</Operation>
10911120
</Platform>
1121+
<Platform Name="OSXARM64">
1122+
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
1123+
<Operation>1</Operation>
1124+
</Platform>
10921125
</DeployClass>
10931126
<DeployClass Name="ProjectOSXEntitlements">
10941127
<Platform Name="OSX32">
@@ -1099,6 +1132,10 @@
10991132
<RemoteDir>..\</RemoteDir>
11001133
<Operation>1</Operation>
11011134
</Platform>
1135+
<Platform Name="OSXARM64">
1136+
<RemoteDir>..\</RemoteDir>
1137+
<Operation>1</Operation>
1138+
</Platform>
11021139
</DeployClass>
11031140
<DeployClass Name="ProjectOSXInfoPList">
11041141
<Platform Name="OSX32">
@@ -1109,6 +1146,10 @@
11091146
<RemoteDir>Contents</RemoteDir>
11101147
<Operation>1</Operation>
11111148
</Platform>
1149+
<Platform Name="OSXARM64">
1150+
<RemoteDir>Contents</RemoteDir>
1151+
<Operation>1</Operation>
1152+
</Platform>
11121153
</DeployClass>
11131154
<DeployClass Name="ProjectOSXResource">
11141155
<Platform Name="OSX32">
@@ -1119,6 +1160,10 @@
11191160
<RemoteDir>Contents\Resources</RemoteDir>
11201161
<Operation>1</Operation>
11211162
</Platform>
1163+
<Platform Name="OSXARM64">
1164+
<RemoteDir>Contents\Resources</RemoteDir>
1165+
<Operation>1</Operation>
1166+
</Platform>
11221167
</DeployClass>
11231168
<DeployClass Required="true" Name="ProjectOutput">
11241169
<Platform Name="Android">
@@ -1149,6 +1194,10 @@
11491194
<RemoteDir>Contents\MacOS</RemoteDir>
11501195
<Operation>1</Operation>
11511196
</Platform>
1197+
<Platform Name="OSXARM64">
1198+
<RemoteDir>Contents\MacOS</RemoteDir>
1199+
<Operation>1</Operation>
1200+
</Platform>
11521201
<Platform Name="Win32">
11531202
<Operation>0</Operation>
11541203
</Platform>
@@ -1187,16 +1236,17 @@
11871236
<Operation>1</Operation>
11881237
</Platform>
11891238
</DeployClass>
1190-
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
1239+
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
1240+
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
1241+
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
1242+
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
1243+
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
11911244
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
1245+
<ProjectRoot Platform="OSXARM64" Name="$(PROJECTNAME).app"/>
11921246
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
1247+
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
11931248
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
1194-
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
1195-
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
1196-
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
1197-
<ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
11981249
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
1199-
<ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
12001250
</Deployment>
12011251
<Platforms>
12021252
<Platform value="Win32">True</Platform>

Demo/Main.dfm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ object MainForm: TMainForm
1010
Font.Height = -11
1111
Font.Name = 'Tahoma'
1212
Font.Style = []
13-
OldCreateOrder = False
1413
ShowHint = True
1514
OnCreate = FormCreate
1615
PixelsPerInch = 96
@@ -31,7 +30,7 @@ object MainForm: TMainForm
3130
Top = 153
3231
Width = 144
3332
Height = 20
34-
Color = clWindow
33+
Color = clWhite
3534
DataField = 'StringField'
3635
DataSource = DataSource
3736
ParentColor = False
@@ -201,7 +200,6 @@ object MainForm: TMainForm
201200
BoundLabel.Alignment = taCenter
202201
BoundLabel.LabelPosition = lpTopCenter
203202
BoundLabel.LabelSpacing = 3
204-
ShowSortOrder = True
205203
UnsortableFields = 'ExtendedField'
206204
Columns = <
207205
item

Demo/Main.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ interface
5959
, Vcl.LabeledCheckLst
6060
, Vcl.LabeledDBListView
6161
, Vcl.Samples.Spin
62+
// , Vcl.LabeledButtonEdit
6263
, Vcl.BoundLabel;
6364

6465
type
@@ -272,7 +273,7 @@ procedure TMainForm.CreateNumberBoxForField(const AField: TField;
272273
LDBNumberBox.SetBounds(ALeft,ATop,131,21);
273274
LDBNumberBox.Hint := 'Hint';
274275
LDBNumberBox.Alignment := taRightJustify;
275-
LDBNumberBox.CurrencyFormat := 2;
276+
// LDBNumberBox.CurrencyFormat := 2;
276277
// LDBNumberBox.MaxValue := 999999999;
277278
// LDBNumberBox.MinValue := -999999999;
278279
LDBNumberBox.TextHint := GetEnumName(TypeInfo(TFieldType), Ord(AField.DataType));

Images/SupportingDelphi.jpg

-7.07 KB
Loading

Source/DBAwareLabeledComponents.inc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,25 @@
183183
{$DEFINE D10_4+}
184184
{$ENDIF}
185185

186+
// Delphi 11.0 Olympus
187+
{$IFDEF VER350}
188+
{$DEFINE D2010+}
189+
{$DEFINE DXE+}
190+
{$DEFINE DXE2+}
191+
{$DEFINE DXE3+}
192+
{$DEFINE DXE4+}
193+
{$DEFINE DXE5+}
194+
{$DEFINE DXE6+}
195+
{$DEFINE DXE7+}
196+
{$DEFINE DXE8+}
197+
{$DEFINE D10_0+}
198+
{$DEFINE D10_1+}
199+
{$DEFINE D10_2+}
200+
{$DEFINE D10_3+}
201+
{$DEFINE D10_4+}
202+
{$DEFINE D11_0+}
203+
{$ENDIF}
204+
186205
//GDI+ support available from DXE6
187206
{$IFDEF DXE4+}
188207
{$Define GDI+}

Source/Vcl.DbAwareLabeledConsts.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ interface
3939
CLEAR_CAPTION = 'Clear reference';
4040
ERR_MAX_LENGTH = 'MaxLength property accepts only positive values';
4141
ERR_NUM_VALUES = 'Cannot set NumberValues without elements';
42+
EXT_FILES_FILTER = '%s file types|*.%s';
43+
ALL_FILES_FILTER = 'All files|*.*';
44+
ALL_IMAGES_FILTER = 'All images files (%s)|%s';
45+
ALL_DOCS_FILTER = 'All documents (%s)|%s';
46+
DEFAULT_DIALOG_TITLE = 'Select the file to open';
47+
UNSUPPORTED_FILE = 'Unsupported file format';
4248

4349
implementation
4450

Source/Vcl.DbAwareLabeledUtils.pas

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ function KillSubString( const SubStr, S : string; CaseSensitive : Boolean = Fals
4747
function PosChar( Ch : Char; const S : string; CaseSensitive : Boolean = False; StartIndex : Integer = 1 ) : Integer;
4848
function PosStr( const SubStr, S : string; CaseSensitive : Boolean = False; StartIndex : Integer = 1 ) : Integer;
4949
function GetValidChars( const S : string; ValidChars : TSetOfChar ) : string;
50+
function DATE_FORMAT : string;
51+
function TIME_HH_MM_SS_FORMAT : string;
52+
function TIME_HH_MM_FORMAT : string;
53+
function DATE_TIME_HH_MM_FORMAT : string;
54+
function DATE_TIME_HH_MM_SS_FORMAT : string;
5055

5156
implementation
5257

@@ -266,4 +271,37 @@ function GetValidChars( const S : string; ValidChars : TSetOfChar ) : string;
266271
SetLength( Result, Count ); // imposta la lunghezza della stringa con i caratteri effettivamente copiati
267272
end;
268273

274+
function DATE_FORMAT : string;
275+
begin
276+
if LowerCase(FormatSettings.ShortDateFormat[1]) = 'd' then
277+
Result := 'dd'+FormatSettings.DateSeparator+'mm'
278+
else
279+
Result := 'mm'+FormatSettings.DateSeparator+'dd';
280+
281+
if pos(LowerCase('yyyy'),LowerCase(FormatSettings.ShortDateFormat)) <> 0 then
282+
Result := Result + FormatSettings.DateSeparator + 'yyyy'
283+
else
284+
Result := Result + FormatSettings.DateSeparator + 'yy';
285+
end;
286+
287+
function TIME_HH_MM_SS_FORMAT : string;
288+
begin
289+
Result := 'hh'+FormatSettings.TimeSeparator+'mm'+FormatSettings.TimeSeparator+'ss';
290+
end;
291+
292+
function TIME_HH_MM_FORMAT : string;
293+
begin
294+
Result := 'hh'+FormatSettings.TimeSeparator+'mm';
295+
end;
296+
297+
function DATE_TIME_HH_MM_FORMAT : string;
298+
begin
299+
Result := DATE_FORMAT + ' '+TIME_HH_MM_FORMAT;
300+
end;
301+
302+
function DATE_TIME_HH_MM_SS_FORMAT : string;
303+
begin
304+
Result := DATE_FORMAT + ' '+TIME_HH_MM_SS_FORMAT;
305+
end;
306+
269307
end.

0 commit comments

Comments
 (0)