Skip to content

Commit 6163efb

Browse files
ver.1.3.0
- Added support for Delphi 12 - Added WrapAllText to TLabeledDbGrid - Fixed 64Bit issue for TLabeledDBComboBox
1 parent 452bd3a commit 6163efb

File tree

50 files changed

+1009
-12858
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1009
-12858
lines changed

Demo/DBAwareLabeledComponentsDemo.dpr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ uses
2424

2525
begin
2626
Application.Initialize;
27-
Application.Title := 'Normal and DataAware Labeled Components Editors Demo - Copyright (c) 2021-2022 Ethea S.r.l.';
27+
Application.Title := 'Normal and DataAware Labeled Components Editors Demo - Copyright (c) 2021-2023 Ethea S.r.l.';
2828
Application.MainFormOnTaskbar := True;
2929
Application.CreateForm(TMainForm, MainForm);
3030
Application.Run;

Demo/DBAwareLabeledComponentsDemo.dproj

Lines changed: 332 additions & 187 deletions
Large diffs are not rendered by default.
133 KB
Binary file not shown.

Demo/Main.dfm

Lines changed: 80 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ object MainForm: TMainForm
22
Left = 0
33
Top = 0
44
Caption = 'DataAwareLabeledComponents Demo'
5-
ClientHeight = 507
6-
ClientWidth = 820
5+
ClientHeight = 687
6+
ClientWidth = 896
77
Color = clBtnFace
88
Font.Charset = DEFAULT_CHARSET
99
Font.Color = clWindowText
@@ -18,26 +18,27 @@ object MainForm: TMainForm
1818
object PageControl: TPageControl
1919
Left = 0
2020
Top = 0
21-
Width = 820
22-
Height = 448
21+
Width = 896
22+
Height = 628
2323
ActivePage = DbGridTabSheet
2424
Align = alClient
2525
TabOrder = 0
26-
ExplicitTop = -6
26+
ExplicitWidth = 892
27+
ExplicitHeight = 627
2728
object DbGridTabSheet: TTabSheet
2829
Caption = 'Labeled and Advanced DbGrid'
2930
ImageIndex = 2
3031
object DbGrid: TLabeledDbGrid
3132
Left = 0
3233
Top = 18
33-
Width = 812
34-
Height = 182
34+
Width = 888
35+
Height = 362
3536
Cursor = crHandPoint
3637
Align = alClient
3738
DataSource = DataSource
3839
TabOrder = 0
3940
BoundCaption = 'Labeled and Advanced DbGrid'
40-
BoundLabel.Left = 326
41+
BoundLabel.Left = 364
4142
BoundLabel.Top = 0
4243
BoundLabel.Width = 160
4344
BoundLabel.Height = 15
@@ -140,31 +141,31 @@ object MainForm: TMainForm
140141
end
141142
object DbGridOptionsPanel: TPanel
142143
Left = 0
143-
Top = 200
144-
Width = 812
144+
Top = 380
145+
Width = 888
145146
Height = 218
146147
Align = alBottom
147148
TabOrder = 1
148-
ExplicitTop = 199
149-
ExplicitWidth = 808
149+
ExplicitTop = 379
150+
ExplicitWidth = 884
150151
object FontLabel: TLabel
151-
Left = 340
152-
Top = 122
152+
Left = 353
153+
Top = 129
153154
Width = 66
154155
Height = 15
155156
Alignment = taRightJustify
156157
Caption = 'Font Height:'
157158
end
158159
object RowLinesLabel: TLabel
159-
Left = 350
160+
Left = 363
160161
Top = 154
161162
Width = 56
162163
Height = 15
163164
Alignment = taRightJustify
164165
Caption = 'Row Lines:'
165166
end
166167
object RowMarginLabel: TLabel
167-
Left = 339
168+
Left = 352
168169
Top = 186
169170
Width = 67
170171
Height = 15
@@ -174,28 +175,28 @@ object MainForm: TMainForm
174175
object cbHcr: TCheckBox
175176
Left = 8
176177
Top = 10
177-
Width = 129
178-
Height = 13
178+
Width = 148
179+
Height = 17
179180
Caption = 'HighLight current row'
180181
TabOrder = 0
181182
OnClick = cbHcrClick
182183
end
183184
object cbSort: TCheckBox
184185
Left = 8
185186
Top = 61
186-
Width = 112
187-
Height = 13
187+
Width = 148
188+
Height = 17
188189
Caption = 'Show Sort Order'
189190
TabOrder = 2
190191
OnClick = cbSortClick
191192
end
192193
object DbGridOptionsGroupBox: TGroupBox
193-
Left = 143
194+
Left = 176
194195
Top = 6
195-
Width = 185
196+
Width = 171
196197
Height = 130
197198
Caption = 'Custom Background color'
198-
TabOrder = 5
199+
TabOrder = 6
199200
object cbCurrColor: TColorBox
200201
Left = 16
201202
Top = 51
@@ -226,131 +227,131 @@ object MainForm: TMainForm
226227
object cbIncremental: TCheckBox
227228
Left = 8
228229
Top = 80
229-
Width = 124
230-
Height = 13
230+
Width = 148
231+
Height = 17
231232
Caption = 'Incremental search'
232233
TabOrder = 3
233234
OnClick = cbIncrementalClick
234235
end
235236
object cbAltColors: TCheckBox
236237
Left = 8
237-
Top = 29
238-
Width = 129
239-
Height = 13
238+
Top = 31
239+
Width = 148
240+
Height = 17
240241
Caption = 'Alternate row colors'
241242
TabOrder = 1
242243
OnClick = cbAltColorsClick
243244
end
244245
object cbCustomDraw: TCheckBox
245246
Left = 8
246247
Top = 112
247-
Width = 96
248-
Height = 13
248+
Width = 148
249+
Height = 17
249250
Caption = 'Custom Draw'
250251
TabOrder = 4
251252
OnClick = cbCustomDrawClick
252253
end
253254
object FontTrackBar: TTrackBar
254-
Left = 412
255+
Left = 425
255256
Top = 119
256257
Width = 133
257258
Height = 25
258259
Max = 30
259260
Min = 10
260261
Position = 11
261-
TabOrder = 11
262+
TabOrder = 12
262263
OnChange = FontTrackBarChange
263264
end
264265
object cbEditing: TCheckBox
265-
Left = 340
266+
Left = 353
266267
Top = 8
267268
Width = 102
268-
Height = 13
269+
Height = 17
269270
Caption = 'Inplace Editing'
270-
TabOrder = 6
271+
TabOrder = 8
271272
OnClick = cbEditingClick
272273
end
273274
object cbAutoEdit: TCheckBox
274-
Left = 340
275+
Left = 353
275276
Top = 29
276277
Width = 131
277-
Height = 13
278+
Height = 17
278279
Caption = 'AutoEdit Datasource'
279-
TabOrder = 7
280+
TabOrder = 9
280281
OnClick = cbAutoEditClick
281282
end
282283
object lbOptions: TCheckListBox
283-
Left = 591
284-
Top = 17
284+
Left = 583
285+
Top = 6
285286
Width = 201
286-
Height = 193
287+
Height = 203
287288
ItemHeight = 15
288-
TabOrder = 10
289+
TabOrder = 15
289290
OnClickCheck = lbOptionsClickCheck
290291
end
291292
object cbDrawCheckBoxImages: TCheckBox
292-
Left = 340
293-
Top = 48
293+
Left = 353
294+
Top = 50
294295
Width = 195
295-
Height = 13
296+
Height = 17
296297
Caption = 'Draw CheckBox for Boolean Fields'
297-
TabOrder = 8
298+
TabOrder = 10
298299
OnClick = cbDrawCheckBoxImagesClick
299300
end
300301
object rgCtl3D: TRadioGroup
301-
Left = 340
302-
Top = 67
303-
Width = 178
302+
Left = 176
303+
Top = 135
304+
Width = 170
304305
Height = 41
305306
Caption = 'Ctl3D'
306307
Columns = 2
307308
ItemIndex = 0
308309
Items.Strings = (
309310
'True'
310311
'False')
311-
TabOrder = 9
312+
TabOrder = 7
312313
OnClick = rgCtl3DClick
313314
end
314315
object LineTrackBar: TTrackBar
315-
Left = 412
316+
Left = 425
316317
Top = 150
317318
Width = 133
318319
Height = 25
319320
Max = 5
320321
Min = 1
321322
Position = 1
322-
TabOrder = 12
323+
TabOrder = 13
323324
OnChange = LineTrackBarChange
324325
end
325326
object RowMarginTrackBar: TTrackBar
326-
Left = 412
327+
Left = 425
327328
Top = 181
328329
Width = 133
329330
Height = 25
330331
Max = 20
331-
TabOrder = 13
332+
TabOrder = 14
332333
OnChange = RowMarginTrackBarChange
333334
end
334335
object filterDataEdit: TLabeledEdit
335336
Left = 8
336-
Top = 155
337-
Width = 297
337+
Top = 153
338+
Width = 162
338339
Height = 23
339340
EditLabel.Width = 114
340341
EditLabel.Height = 15
341342
EditLabel.Caption = 'Filter data expression:'
342-
TabOrder = 14
343+
TabOrder = 5
343344
Text = ''
344345
OnExit = filterDataEditExit
345346
end
346-
object btSelectStyle: TButton
347-
Left = 8
348-
Top = 182
349-
Width = 162
350-
Height = 29
351-
Caption = 'Change Application Style...'
352-
TabOrder = 15
353-
OnClick = btSelectStyleClick
347+
object cbWrapAllText: TCheckBox
348+
Left = 353
349+
Top = 72
350+
Width = 195
351+
Height = 17
352+
Caption = 'Wrap All Text'
353+
TabOrder = 11
354+
OnClick = cbWrapAllTextClick
354355
end
355356
end
356357
end
@@ -5365,13 +5366,13 @@ object MainForm: TMainForm
53655366
end
53665367
object BottomPanel: TPanel
53675368
Left = 0
5368-
Top = 448
5369-
Width = 820
5369+
Top = 628
5370+
Width = 896
53705371
Height = 59
53715372
Align = alBottom
53725373
TabOrder = 1
5373-
ExplicitTop = 447
5374-
ExplicitWidth = 816
5374+
ExplicitTop = 627
5375+
ExplicitWidth = 892
53755376
object OpenButton: TButton
53765377
Left = 8
53775378
Top = 14
@@ -5426,12 +5427,21 @@ object MainForm: TMainForm
54265427
OnClick = VisibleCheckBoxClick
54275428
end
54285429
object DBNavigator: TDBNavigator
5429-
Left = 469
5430+
Left = 477
54305431
Top = 16
54315432
Width = 240
54325433
Height = 25
54335434
TabOrder = 3
54345435
end
5436+
object btSelectStyle: TButton
5437+
Left = 723
5438+
Top = 14
5439+
Width = 162
5440+
Height = 29
5441+
Caption = 'Change Application Style...'
5442+
TabOrder = 4
5443+
OnClick = btSelectStyleClick
5444+
end
54355445
end
54365446
object ClientDataSet: TClientDataSet
54375447
Aggregates = <>

Demo/Main.pas

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{ }
33
{ DataAwareLabeledComponents: Dataaware Edit components with Label }
44
{ }
5-
{ Copyright (c) 2021 (Ethea S.r.l.) }
5+
{ Copyright (c) 2021-2023 (Ethea S.r.l.) }
66
{ Author: Carlo Barazzetta }
77
{ }
88
{ https://github.com/EtheaDev/DBAwareLabeledComponents }
@@ -63,6 +63,7 @@ interface
6363
, Vcl.LabeledButtonEdit
6464
{$ENDIF}
6565
, Vcl.BoundLabel
66+
, Vcl.Buttons
6667
;
6768

6869
type
@@ -146,6 +147,7 @@ TMainForm = class(TForm)
146147
filterDataEdit: TLabeledEdit;
147148
DBNavigator: TDBNavigator;
148149
btSelectStyle: TButton;
150+
cbWrapAllText: TCheckBox;
149151
procedure ClientDataSetAfterEdit(DataSet: TDataSet);
150152
procedure OpenButtonClick(Sender: TObject);
151153
procedure ClientDataSetIntegerFieldChange(Sender: TField);
@@ -177,6 +179,7 @@ TMainForm = class(TForm)
177179
procedure PositionLabeledComboBoxSelect(Sender: TObject);
178180
procedure VisibleCheckBoxClick(Sender: TObject);
179181
procedure LabeledButtonEditClick(Sender: TObject);
182+
procedure cbWrapAllTextClick(Sender: TObject);
180183
private
181184
FMemoText: string;
182185
procedure BkCellColorAssign(Column : TColumn; DrawingCurrentRecord : boolean; var CellColor : TColor);
@@ -320,6 +323,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
320323
cbIncremental.Checked := DbGrid.IncrementalSearch;
321324
cbCustomDraw.Checked := Assigned(DbGrid.OnDrawColumnCell);
322325
cbDrawCheckBoxImages.Checked := DbGrid.DrawCheckBoxImages;
326+
cbWrapAllText.Checked := DbGrid.WrapAllText;
323327

324328
DbGridOptions := GetPropValue(DbGrid, 'Options');
325329
for i := Low(TDBGridOption) to High(TDBGridOption) do
@@ -597,6 +601,11 @@ procedure TMainForm.cbSortClick(Sender: TObject);
597601
DbGrid.ShowSortOrder := cbSort.Checked;
598602
end;
599603

604+
procedure TMainForm.cbWrapAllTextClick(Sender: TObject);
605+
begin
606+
DbGrid.WrapAllText := cbWrapAllText.Checked;
607+
end;
608+
600609
procedure TMainForm.filterDataEditExit(Sender: TObject);
601610
begin
602611
if filterDataEdit.Text <> '' then

Images/SupportingDelphi.jpg

1.33 KB
Loading

0 commit comments

Comments
 (0)