Skip to content

Commit 81e0f34

Browse files
Versione 1.2.2
Fixed Demo for every Delphi versions
1 parent edb12c3 commit 81e0f34

39 files changed

+1429
-1057
lines changed

Demo/DBAwareLabeledComponentsDemo.dproj

Lines changed: 22 additions & 333 deletions
Large diffs are not rendered by default.
-28 Bytes
Binary file not shown.

Demo/Main.dfm

Lines changed: 121 additions & 212 deletions
Large diffs are not rendered by default.

Demo/Main.pas

Lines changed: 67 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ interface
5959
, Vcl.LabeledCheckLst
6060
, Vcl.LabeledDBListView
6161
, Vcl.Samples.Spin
62+
{$IFDEF D10_3+}
6263
, Vcl.LabeledButtonEdit
64+
{$ENDIF}
6365
, Vcl.BoundLabel
6466
;
6567

@@ -144,12 +146,6 @@ TMainForm = class(TForm)
144146
filterDataEdit: TLabeledEdit;
145147
DBNavigator: TDBNavigator;
146148
btSelectStyle: TButton;
147-
LabeledDBButtonEditFind: TLabeledDBButtonEdit;
148-
LabeledDBButtonEditCalendar: TLabeledDBButtonEdit;
149-
LabeledDBButtonEditColor: TLabeledDBButtonEdit;
150-
LabeledButtonEditFind: TLabeledButtonEdit;
151-
LabeledButtonEditCalendar: TLabeledButtonEdit;
152-
LabeledButtonEditColor: TLabeledButtonEdit;
153149
procedure ClientDataSetAfterEdit(DataSet: TDataSet);
154150
procedure OpenButtonClick(Sender: TObject);
155151
procedure ClientDataSetIntegerFieldChange(Sender: TField);
@@ -180,12 +176,20 @@ TMainForm = class(TForm)
180176
procedure filterDataEditExit(Sender: TObject);
181177
procedure PositionLabeledComboBoxSelect(Sender: TObject);
182178
procedure VisibleCheckBoxClick(Sender: TObject);
183-
procedure LabeledDBButtonEditFindButtonEditClick(Sender: TObject);
179+
procedure LabeledButtonEditClick(Sender: TObject);
184180
private
185181
FMemoText: string;
186182
procedure BkCellColorAssign(Column : TColumn; DrawingCurrentRecord : boolean; var CellColor : TColor);
187183
procedure CreateControls;
188184
procedure CreateAndFillDataSets;
185+
{$IFDEF D10_1+}
186+
procedure CreateButtonEditForField(const AField: TField;
187+
const ATop, ALeft: Integer; const ACaption: string;
188+
const AButtonEditStyle: TButtonEditStyle);
189+
procedure CreateButtonEdit(const ATop, ALeft: Integer;
190+
const ACaption: string; const AButtonEditStyle: TButtonEditStyle);
191+
{$ENDIF}
192+
189193
{$IFDEF D10_4+}
190194
procedure CreateNumberBoxForField(const AField: TField;
191195
const ATop, ALeft: Integer);
@@ -350,6 +354,45 @@ procedure TMainForm.FillEditors;
350354
LabeledMemo.Lines.Text := FMemoText;
351355
end;
352356

357+
{$IFDEF D10_1+}
358+
procedure TMainForm.CreateButtonEditForField(const AField: TField;
359+
const ATop, ALeft: Integer; const ACaption: string;
360+
const AButtonEditStyle: TButtonEditStyle);
361+
var
362+
LabeledDBButtonEditFind: TLabeledDBButtonEdit;
363+
begin
364+
LabeledDBButtonEditFind := TLabeledDBButtonEdit.Create(Self);
365+
LabeledDBButtonEditFind.Parent := DBTabSheet;
366+
LabeledDBButtonEditFind.Left := ALeft;
367+
LabeledDBButtonEditFind.Top := ATop;
368+
LabeledDBButtonEditFind.Width := 185;
369+
LabeledDBButtonEditFind.Height := 21;
370+
LabeledDBButtonEditFind.DataField := AField.FieldName;
371+
LabeledDBButtonEditFind.DataSource := DataSource;
372+
LabeledDBButtonEditFind.BoundCaption := ACaption;
373+
LabeledDBButtonEditFind.ButtonEditStyle := AButtonEditStyle;
374+
if AButtonEditStyle = besFind then
375+
LabeledDBButtonEditFind.OnButtonEditClick := LabeledButtonEditClick;
376+
end;
377+
378+
procedure TMainForm.CreateButtonEdit(const ATop, ALeft: Integer;
379+
const ACaption: string; const AButtonEditStyle: TButtonEditStyle);
380+
var
381+
LabeledDBButtonEditFind: TLabeledButtonEdit;
382+
begin
383+
LabeledDBButtonEditFind := TLabeledButtonEdit.Create(Self);
384+
LabeledDBButtonEditFind.Parent := stdControlsTabSheet;
385+
LabeledDBButtonEditFind.Left := ALeft;
386+
LabeledDBButtonEditFind.Top := ATop;
387+
LabeledDBButtonEditFind.Width := 185;
388+
LabeledDBButtonEditFind.Height := 21;
389+
LabeledDBButtonEditFind.BoundCaption := ACaption;
390+
LabeledDBButtonEditFind.ButtonEditStyle := AButtonEditStyle;
391+
if AButtonEditStyle = besFind then
392+
LabeledDBButtonEditFind.OnButtonEditClick := LabeledButtonEditClick;
393+
end;
394+
{$ENDIF}
395+
353396
{$IFDEF D10_4+}
354397
procedure TMainForm.CreateNumberBoxForField(const AField: TField;
355398
const ATop, ALeft: Integer);
@@ -383,6 +426,22 @@ procedure TMainForm.CreateControls;
383426
CreateDBCurrencyEdit(ClientDataSetExtendedField, 180,110);
384427
CreateDBCurrencyEdit(ClientDataSetFmtBCDField, 220,110);
385428

429+
{$IFDEF D10_1+}
430+
CreateButtonEditForField(ClientDataSetStringField, 296, 88,
431+
'LabeledDBButtonEdit (find):', besFind);
432+
CreateButtonEditForField(ClientDataSetDateField, 296, 333,
433+
'LabeledDBButtonEdit (calendar):', besDate);
434+
CreateButtonEditForField(ClientDataSetIntegerField, 296, 592,
435+
'LabeledDBButtonEdit (color):', besColor);
436+
437+
CreateButtonEdit(380, 88,
438+
'LabeledDBButtonEdit (find):', besFind);
439+
CreateButtonEdit(380, 340,
440+
'LabeledDBButtonEdit (calendar):', besDate);
441+
CreateButtonEdit(380, 600,
442+
'LabeledDBButtonEdit (color):', besColor);
443+
{$ENDIF}
444+
386445
{$IFDEF D10_4+}
387446
CreateNumberBoxForField(ClientDataSetIntegerField, 20,360);
388447
CreateNumberBoxForField(ClientDataSetFloatField, 60,360);
@@ -589,7 +648,7 @@ procedure TMainForm.gridDrawColumnCell(Sender: TObject; const Rect: TRect;
589648
DbGrid.DefaultDrawColumnCell(Rect, DataCol, Column, State);
590649
end;
591650

592-
procedure TMainForm.LabeledDBButtonEditFindButtonEditClick(Sender: TObject);
651+
procedure TMainForm.LabeledButtonEditClick(Sender: TObject);
593652
begin
594653
ShowMessage('OnButtonEditClick event');
595654
end;

Packages/D10_1/DBAwareLabeledComponents.dpk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ package DBAwareLabeledComponents;
2828
{$DESCRIPTION 'Ethea: Dataaware Labeled Components'}
2929
{$LIBSUFFIX '_D10.1'}
3030
{$RUNONLY}
31-
{$WARNINGS OFF}
3231
{$IMPLICITBUILD ON}
3332

3433
requires

Packages/D10_1/DBAwareLabeledComponents.dproj

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<Base>true</Base>
3636
</PropertyGroup>
3737
<PropertyGroup Condition="'$(Base)'!=''">
38+
<VerInfo_Release>2</VerInfo_Release>
3839
<VerInfo_MinorVer>2</VerInfo_MinorVer>
3940
<DCC_DcuOutput>..\..\Dcu\D10.1\$(Platform)\$(Config)</DCC_DcuOutput>
4041
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
@@ -50,7 +51,7 @@
5051
<SanitizedProjectName>DBAwareLabeledComponents</SanitizedProjectName>
5152
<DCC_UnitSearchPath>..\..\Source;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
5253
<VerInfo_Locale>1033</VerInfo_Locale>
53-
<VerInfo_Keys>CompanyName=DBAwareLabeledComponents;FileDescription=Dataaware Labeled Components;FileVersion=1.2.0.0;InternalName=;LegalCopyright=Copyright (c) 2021-2022 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProgramID=;ProductName=;ProductVersion=1.2;Comments=</VerInfo_Keys>
54+
<VerInfo_Keys>CompanyName=DBAwareLabeledComponents;FileDescription=Dataaware Labeled Components;FileVersion=1.2.2.0;InternalName=;LegalCopyright=Copyright (c) 2021-2022 - Ethea S.r.l.;LegalTrademarks=;OriginalFilename=;ProgramID=;ProductName=;ProductVersion=1.2;Comments=</VerInfo_Keys>
5455
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
5556
<DCC_Description>Ethea: Dataaware Labeled Components</DCC_Description>
5657
<RuntimeOnlyPackage>true</RuntimeOnlyPackage>
@@ -127,7 +128,18 @@
127128
<Source>
128129
<Source Name="MainSource">DBAwareLabeledComponents.dpk</Source>
129130
</Source>
130-
<Excluded_Packages/>
131+
<Excluded_Packages>
132+
<Excluded_Packages Name="C:\Program Files (x86)\FastReports\LibD24\dclfrx24.bpl">File C:\Program Files (x86)\FastReports\LibD24\dclfrx24.bpl not found</Excluded_Packages>
133+
<Excluded_Packages Name="C:\Program Files (x86)\FastReports\LibD24\dclfrxDB24.bpl">File C:\Program Files (x86)\FastReports\LibD24\dclfrxDB24.bpl not found</Excluded_Packages>
134+
<Excluded_Packages Name="C:\Program Files (x86)\FastReports\LibD24\dclfrxe24.bpl">File C:\Program Files (x86)\FastReports\LibD24\dclfrxe24.bpl not found</Excluded_Packages>
135+
<Excluded_Packages Name="C:\Program Files (x86)\FastReports\LibD24\dclfrxtee24.bpl">File C:\Program Files (x86)\FastReports\LibD24\dclfrxtee24.bpl not found</Excluded_Packages>
136+
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\dclISRtl7_D10_1.bpl">Ethea InstantSolutions 7 Rtl Library</Excluded_Packages>
137+
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\dclISVcl7_D10_1.bpl">Ethea InstantSolutions 7 Vcl Library</Excluded_Packages>
138+
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\dclISOpenOffice7_D10_1.bpl">Ethea InstantSolutions 7 LibreOffice/OpenOffice Components</Excluded_Packages>
139+
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\dclISFLib7_D10_1.bpl">Ethea InstantSolutions 7 Framework Library</Excluded_Packages>
140+
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
141+
<Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
142+
</Excluded_Packages>
131143
</Delphi.Personality>
132144
<Deployment Version="3">
133145
<DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
@@ -151,15 +163,6 @@
151163
<Overwrite>true</Overwrite>
152164
</Platform>
153165
</DeployFile>
154-
<DeployClass Name="AdditionalDebugSymbols">
155-
<Platform Name="Win32">
156-
<RemoteDir>Contents\MacOS</RemoteDir>
157-
<Operation>0</Operation>
158-
</Platform>
159-
<Platform Name="OSX32">
160-
<Operation>1</Operation>
161-
</Platform>
162-
</DeployClass>
163166
<DeployClass Name="iPhone_Notification40">
164167
<Platform Name="iOSDevice64">
165168
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
@@ -170,6 +173,15 @@
170173
<Operation>1</Operation>
171174
</Platform>
172175
</DeployClass>
176+
<DeployClass Name="AdditionalDebugSymbols">
177+
<Platform Name="Win32">
178+
<RemoteDir>Contents\MacOS</RemoteDir>
179+
<Operation>0</Operation>
180+
</Platform>
181+
<Platform Name="OSX32">
182+
<Operation>1</Operation>
183+
</Platform>
184+
</DeployClass>
173185
<DeployClass Required="true" Name="ProjectOutput">
174186
<Platform Name="iOSDevice64">
175187
<Operation>1</Operation>
@@ -225,11 +237,11 @@
225237
</Platform>
226238
</DeployClass>
227239
<DeployClass Name="AndroidSplashStylesV21">
228-
<Platform Name="Android64">
240+
<Platform Name="Android">
229241
<RemoteDir>res\values-v21</RemoteDir>
230242
<Operation>1</Operation>
231243
</Platform>
232-
<Platform Name="Android">
244+
<Platform Name="Android64">
233245
<RemoteDir>res\values-v21</RemoteDir>
234246
<Operation>1</Operation>
235247
</Platform>
@@ -256,11 +268,11 @@
256268
</Platform>
257269
</DeployClass>
258270
<DeployClass Name="Android_NotificationIcon48">
259-
<Platform Name="Android64">
271+
<Platform Name="Android">
260272
<RemoteDir>res\drawable-xhdpi</RemoteDir>
261273
<Operation>1</Operation>
262274
</Platform>
263-
<Platform Name="Android">
275+
<Platform Name="Android64">
264276
<RemoteDir>res\drawable-xhdpi</RemoteDir>
265277
<Operation>1</Operation>
266278
</Platform>
@@ -279,11 +291,11 @@
279291
</Platform>
280292
</DeployClass>
281293
<DeployClass Name="Android_Colors">
282-
<Platform Name="Android64">
294+
<Platform Name="Android">
283295
<RemoteDir>res\values</RemoteDir>
284296
<Operation>1</Operation>
285297
</Platform>
286-
<Platform Name="Android">
298+
<Platform Name="Android64">
287299
<RemoteDir>res\values</RemoteDir>
288300
<Operation>1</Operation>
289301
</Platform>
@@ -310,22 +322,22 @@
310322
</Platform>
311323
</DeployClass>
312324
<DeployClass Name="Android_LauncherIcon192">
313-
<Platform Name="Android64">
325+
<Platform Name="Android">
314326
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
315327
<Operation>1</Operation>
316328
</Platform>
317-
<Platform Name="Android">
329+
<Platform Name="Android64">
318330
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
319331
<Operation>1</Operation>
320332
</Platform>
321333
</DeployClass>
322334
<DeployClass Name="ProjectiOSLaunchScreen"/>
323335
<DeployClass Name="Android_NotificationIcon96">
324-
<Platform Name="Android64">
336+
<Platform Name="Android">
325337
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
326338
<Operation>1</Operation>
327339
</Platform>
328-
<Platform Name="Android">
340+
<Platform Name="Android64">
329341
<RemoteDir>res\drawable-xxxhdpi</RemoteDir>
330342
<Operation>1</Operation>
331343
</Platform>
@@ -402,11 +414,11 @@
402414
</Platform>
403415
</DeployClass>
404416
<DeployClass Name="AndroidFileProvider">
405-
<Platform Name="Android64">
417+
<Platform Name="Android">
406418
<RemoteDir>res\xml</RemoteDir>
407419
<Operation>1</Operation>
408420
</Platform>
409-
<Platform Name="Android">
421+
<Platform Name="Android64">
410422
<RemoteDir>res\xml</RemoteDir>
411423
<Operation>1</Operation>
412424
</Platform>
@@ -542,21 +554,21 @@
542554
</Platform>
543555
</DeployClass>
544556
<DeployClass Name="Android_NotificationIcon24">
545-
<Platform Name="Android64">
557+
<Platform Name="Android">
546558
<RemoteDir>res\drawable-mdpi</RemoteDir>
547559
<Operation>1</Operation>
548560
</Platform>
549-
<Platform Name="Android">
561+
<Platform Name="Android64">
550562
<RemoteDir>res\drawable-mdpi</RemoteDir>
551563
<Operation>1</Operation>
552564
</Platform>
553565
</DeployClass>
554566
<DeployClass Name="Android_NotificationIcon72">
555-
<Platform Name="Android64">
567+
<Platform Name="Android">
556568
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
557569
<Operation>1</Operation>
558570
</Platform>
559-
<Platform Name="Android">
571+
<Platform Name="Android64">
560572
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
561573
<Operation>1</Operation>
562574
</Platform>
@@ -619,6 +631,12 @@
619631
<Extensions>.dylib</Extensions>
620632
</Platform>
621633
</DeployClass>
634+
<DeployClass Name="AndroidServiceOutput_Android32">
635+
<Platform Name="Android64">
636+
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
637+
<Operation>1</Operation>
638+
</Platform>
639+
</DeployClass>
622640
<DeployClass Name="iPad_Setting58">
623641
<Platform Name="iOSDevice64">
624642
<RemoteDir>..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset</RemoteDir>
@@ -667,12 +685,6 @@
667685
<Operation>1</Operation>
668686
</Platform>
669687
</DeployClass>
670-
<DeployClass Name="AndroidServiceOutput_Android32">
671-
<Platform Name="Android64">
672-
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
673-
<Operation>1</Operation>
674-
</Platform>
675-
</DeployClass>
676688
<DeployClass Name="ProjectOSXDebug"/>
677689
<DeployClass Name="AndroidClassesDexFile">
678690
<Platform Name="Android">
@@ -966,11 +978,11 @@
966978
</Platform>
967979
</DeployClass>
968980
<DeployClass Name="Android_Strings">
969-
<Platform Name="Android64">
981+
<Platform Name="Android">
970982
<RemoteDir>res\values</RemoteDir>
971983
<Operation>1</Operation>
972984
</Platform>
973-
<Platform Name="Android">
985+
<Platform Name="Android64">
974986
<RemoteDir>res\values</RemoteDir>
975987
<Operation>1</Operation>
976988
</Platform>
@@ -1028,11 +1040,11 @@
10281040
</Platform>
10291041
</DeployClass>
10301042
<DeployClass Name="Android_NotificationIcon36">
1031-
<Platform Name="Android64">
1043+
<Platform Name="Android">
10321044
<RemoteDir>res\drawable-hdpi</RemoteDir>
10331045
<Operation>1</Operation>
10341046
</Platform>
1035-
<Platform Name="Android">
1047+
<Platform Name="Android64">
10361048
<RemoteDir>res\drawable-hdpi</RemoteDir>
10371049
<Operation>1</Operation>
10381050
</Platform>
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)