Skip to content

Commit a883853

Browse files
Added component LabeledDBButtonEdit and LabeledDBButtonEdit
1 parent 7ef9ede commit a883853

37 files changed

+1064
-1095
lines changed

Demo/DBAwareLabeledComponentsDemo.dproj

Lines changed: 39 additions & 55 deletions
Large diffs are not rendered by default.
-790 KB
Binary file not shown.

Demo/Main.dfm

Lines changed: 105 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ object MainForm: TMainForm
1010
Font.Height = -11
1111
Font.Name = 'Tahoma'
1212
Font.Style = []
13+
OldCreateOrder = True
1314
ShowHint = True
1415
WindowState = wsMaximized
1516
OnCreate = FormCreate
1617
OnShow = FormShow
18+
PixelsPerInch = 96
1719
TextHeight = 13
1820
object PageControl: TPageControl
1921
Left = 0
@@ -281,9 +283,9 @@ object MainForm: TMainForm
281283
Top = 17
282284
Width = 201
283285
Height = 193
286+
OnClickCheck = lbOptionsClickCheck
284287
ItemHeight = 13
285288
TabOrder = 10
286-
OnClickCheck = lbOptionsClickCheck
287289
end
288290
object cbDrawCheckBoxImages: TCheckBox
289291
Left = 340
@@ -337,7 +339,6 @@ object MainForm: TMainForm
337339
EditLabel.Height = 13
338340
EditLabel.Caption = 'Filter data expression:'
339341
TabOrder = 14
340-
Text = ''
341342
OnExit = filterDataEditExit
342343
end
343344
object btSelectStyle: TButton
@@ -371,7 +372,7 @@ object MainForm: TMainForm
371372
end
372373
object LabeledDBComboBox: TLabeledDBComboBox
373374
Left = 88
374-
Top = 72
375+
Top = 66
375376
Width = 144
376377
Height = 21
377378
DataField = 'StringField'
@@ -383,7 +384,7 @@ object MainForm: TMainForm
383384
TabOrder = 1
384385
BoundCaption = 'LabeledDBComboBox:'
385386
BoundLabel.Left = 88
386-
BoundLabel.Top = 58
387+
BoundLabel.Top = 52
387388
BoundLabel.Width = 105
388389
BoundLabel.Height = 13
389390
end
@@ -395,7 +396,7 @@ object MainForm: TMainForm
395396
DataField = 'MemoField'
396397
DataSource = DataSource
397398
ScrollBars = ssVertical
398-
TabOrder = 2
399+
TabOrder = 3
399400
BoundCaption = 'LabeledDBMemo:'
400401
BoundLabel.Left = 88
401402
BoundLabel.Top = 194
@@ -415,7 +416,8 @@ object MainForm: TMainForm
415416
Font.Name = 'Tahoma'
416417
Font.Style = []
417418
ScrollBars = ssVertical
418-
TabOrder = 3
419+
TabOrder = 5
420+
Zoom = 100
419421
BoundCaption = 'LabeledDBRichEdit:'
420422
BoundLabel.Left = 332
421423
BoundLabel.Top = 10
@@ -434,7 +436,7 @@ object MainForm: TMainForm
434436
'First'
435437
'Second'
436438
'Last')
437-
TabOrder = 4
439+
TabOrder = 6
438440
BoundCaption = 'LabeledDBListBox:'
439441
BoundLabel.Left = 333
440442
BoundLabel.Top = 114
@@ -465,7 +467,7 @@ object MainForm: TMainForm
465467
KeyField = 'Key'
466468
ListField = 'Value'
467469
ListSource = ListDataSource
468-
TabOrder = 5
470+
TabOrder = 2
469471
BoundCaption = 'LabeledDBLookupComboBox:'
470472
BoundLabel.Left = 88
471473
BoundLabel.Top = 98
@@ -482,7 +484,7 @@ object MainForm: TMainForm
482484
KeyField = 'Key'
483485
ListField = 'Value'
484486
ListSource = ListDataSource
485-
TabOrder = 6
487+
TabOrder = 7
486488
BoundCaption = 'LabeledDBLookupListBox:'
487489
BoundLabel.Left = 333
488490
BoundLabel.Top = 194
@@ -492,19 +494,64 @@ object MainForm: TMainForm
492494
object LabeledDBImage: TLabeledDBImage
493495
Left = 592
494496
Top = 24
495-
Width = 180
497+
Width = 185
496498
Height = 253
497499
DataField = 'BlobField'
498500
DataSource = DataSource
499501
Proportional = True
500502
Stretch = True
501-
TabOrder = 7
503+
TabOrder = 9
502504
BoundCaption = 'LabeledDBImage'
503505
BoundLabel.Left = 592
504506
BoundLabel.Top = 10
505507
BoundLabel.Width = 80
506508
BoundLabel.Height = 13
507509
end
510+
object LabeledDBButtonEditFind: TLabeledDBButtonEdit
511+
Left = 88
512+
Top = 296
513+
Width = 185
514+
Height = 21
515+
DataField = 'StringField'
516+
DataSource = DataSource
517+
TabOrder = 4
518+
BoundCaption = 'LabeledDBButtonEdit (find):'
519+
BoundLabel.Left = 88
520+
BoundLabel.Top = 282
521+
BoundLabel.Width = 133
522+
BoundLabel.Height = 13
523+
OnButtonEditClick = LabeledDBButtonEditFindButtonEditClick
524+
end
525+
object LabeledDBButtonEditCalendar: TLabeledDBButtonEdit
526+
Left = 333
527+
Top = 296
528+
Width = 185
529+
Height = 21
530+
DataField = 'DateField'
531+
DataSource = DataSource
532+
TabOrder = 8
533+
BoundCaption = 'LabeledDBButtonEdit (calendar):'
534+
BoundLabel.Left = 333
535+
BoundLabel.Top = 282
536+
BoundLabel.Width = 156
537+
BoundLabel.Height = 13
538+
ButtonEditStyle = besDate
539+
end
540+
object LabeledDBButtonEditColor: TLabeledDBButtonEdit
541+
Left = 592
542+
Top = 296
543+
Width = 185
544+
Height = 21
545+
DataField = 'IntegerField'
546+
DataSource = DataSource
547+
TabOrder = 10
548+
BoundCaption = 'LabeledDBButtonEdit (color):'
549+
BoundLabel.Left = 592
550+
BoundLabel.Top = 282
551+
BoundLabel.Width = 138
552+
BoundLabel.Height = 13
553+
ButtonEditStyle = besColor
554+
end
508555
end
509556
object NumberBoxTabSheet: TTabSheet
510557
Caption = 'Number Editors'
@@ -616,6 +663,7 @@ object MainForm: TMainForm
616663
ParentFont = False
617664
ScrollBars = ssVertical
618665
TabOrder = 7
666+
Zoom = 100
619667
BoundCaption = 'LabeledRichEdit:'
620668
BoundLabel.Left = 340
621669
BoundLabel.Top = 102
@@ -672,6 +720,52 @@ object MainForm: TMainForm
672720
BoundLabel.Width = 69
673721
BoundLabel.Height = 13
674722
end
723+
object LabeledButtonEditFind: TLabeledButtonEdit
724+
Left = 600
725+
Top = 24
726+
Width = 185
727+
Height = 21
728+
TabOrder = 10
729+
Text = ''
730+
BoundCaption = 'LabeledDBButtonEdit (find):'
731+
BoundLabel.Left = 600
732+
BoundLabel.Top = 10
733+
BoundLabel.Width = 133
734+
BoundLabel.Height = 13
735+
OnButtonEditClick = LabeledDBButtonEditFindButtonEditClick
736+
end
737+
object LabeledButtonEditCalendar: TLabeledButtonEdit
738+
Left = 600
739+
Top = 64
740+
Width = 185
741+
Height = 21
742+
EditMask = '!99/99/9999;1; '
743+
MaxLength = 10
744+
TabOrder = 11
745+
Text = ' / / '
746+
BoundCaption = 'LabeledDBButtonEdit (calendar):'
747+
BoundLabel.Left = 600
748+
BoundLabel.Top = 50
749+
BoundLabel.Width = 156
750+
BoundLabel.Height = 13
751+
ButtonEditStyle = besDate
752+
end
753+
object LabeledButtonEditColor: TLabeledButtonEdit
754+
Left = 600
755+
Top = 104
756+
Width = 185
757+
Height = 21
758+
EditMask = '>aaaaaa;1; '
759+
MaxLength = 6
760+
TabOrder = 12
761+
Text = ' '
762+
BoundCaption = 'LabeledDBButtonEdit (color):'
763+
BoundLabel.Left = 600
764+
BoundLabel.Top = 90
765+
BoundLabel.Width = 138
766+
BoundLabel.Height = 13
767+
ButtonEditStyle = besColor
768+
end
675769
end
676770
object ColorsTabSheet: TTabSheet
677771
Caption = 'Colors and Images'

Demo/Main.pas

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

@@ -144,6 +144,12 @@ TMainForm = class(TForm)
144144
filterDataEdit: TLabeledEdit;
145145
DBNavigator: TDBNavigator;
146146
btSelectStyle: TButton;
147+
LabeledDBButtonEditFind: TLabeledDBButtonEdit;
148+
LabeledDBButtonEditCalendar: TLabeledDBButtonEdit;
149+
LabeledDBButtonEditColor: TLabeledDBButtonEdit;
150+
LabeledButtonEditFind: TLabeledButtonEdit;
151+
LabeledButtonEditCalendar: TLabeledButtonEdit;
152+
LabeledButtonEditColor: TLabeledButtonEdit;
147153
procedure ClientDataSetAfterEdit(DataSet: TDataSet);
148154
procedure OpenButtonClick(Sender: TObject);
149155
procedure ClientDataSetIntegerFieldChange(Sender: TField);
@@ -174,6 +180,7 @@ TMainForm = class(TForm)
174180
procedure filterDataEditExit(Sender: TObject);
175181
procedure PositionLabeledComboBoxSelect(Sender: TObject);
176182
procedure VisibleCheckBoxClick(Sender: TObject);
183+
procedure LabeledDBButtonEditFindButtonEditClick(Sender: TObject);
177184
private
178185
FMemoText: string;
179186
procedure BkCellColorAssign(Column : TColumn; DrawingCurrentRecord : boolean; var CellColor : TColor);
@@ -582,6 +589,11 @@ procedure TMainForm.gridDrawColumnCell(Sender: TObject; const Rect: TRect;
582589
DbGrid.DefaultDrawColumnCell(Rect, DataCol, Column, State);
583590
end;
584591

592+
procedure TMainForm.LabeledDBButtonEditFindButtonEditClick(Sender: TObject);
593+
begin
594+
ShowMessage('OnButtonEditClick event');
595+
end;
596+
585597
procedure TMainForm.cbCustomDrawClick(Sender: TObject);
586598
begin
587599
if cbCustomDraw.Checked then

Images/DemoDataAwareTopLeft.png

4.55 KB
Loading
4.61 KB
Loading

Images/DemoNumberInputStyled.png

403 Bytes
Loading

Packages/D10_3/DBAwareLabeledComponents.dpk

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ package DBAwareLabeledComponents;
99
{$EXTENDEDSYNTAX ON}
1010
{$IMPORTEDDATA ON}
1111
{$IOCHECKS ON}
12-
{$LOCALSYMBOLS ON}
12+
{$LOCALSYMBOLS OFF}
1313
{$LONGSTRINGS ON}
1414
{$OPENSTRINGS ON}
15-
{$OPTIMIZATION OFF}
15+
{$OPTIMIZATION ON}
1616
{$OVERFLOWCHECKS OFF}
1717
{$RANGECHECKS OFF}
18-
{$REFERENCEINFO ON}
18+
{$REFERENCEINFO OFF}
1919
{$SAFEDIVIDE OFF}
20-
{$STACKFRAMES ON}
20+
{$STACKFRAMES OFF}
2121
{$TYPEDADDRESS OFF}
2222
{$VARSTRINGCHECKS ON}
2323
{$WRITEABLECONST OFF}
2424
{$MINENUMSIZE 1}
2525
{$IMAGEBASE $400000}
26-
{$DEFINE DEBUG}
26+
{$DEFINE RELEASE}
2727
{$ENDIF IMPLICITBUILDING}
28-
{$DESCRIPTION 'Dataaware Labeled Components by Ethea'}
28+
{$DESCRIPTION 'Ethea: Dataaware Labeled Components'}
2929
{$LIBSUFFIX '_D10.3'}
3030
{$RUNONLY}
31+
{$WARNINGS OFF}
3132
{$IMPLICITBUILD ON}
3233

3334
requires
@@ -45,6 +46,9 @@ contains
4546
Vcl.BoundLabel in '..\..\Source\Vcl.BoundLabel.pas',
4647
Vcl.DbAwareLabeledConsts in '..\..\Source\Vcl.DbAwareLabeledConsts.pas',
4748
Vcl.DbAwareLabeledUtils in '..\..\Source\Vcl.DbAwareLabeledUtils.pas',
49+
Vcl.LabeledGraphicUtils in '..\..\Source\Vcl.LabeledGraphicUtils.pas',
50+
Vcl.Form.CalendarView in '..\..\Source\Vcl.Form.CalendarView.pas',
51+
Vcl.LabeledButtonEdit in '..\..\Source\Vcl.LabeledButtonEdit.pas',
4852
Vcl.LabeledCheckLst in '..\..\Source\Vcl.LabeledCheckLst.pas',
4953
Vcl.LabeledColorGrd in '..\..\Source\Vcl.LabeledColorGrd.pas',
5054
Vcl.LabeledComCtrls in '..\..\Source\Vcl.LabeledComCtrls.pas',

0 commit comments

Comments
 (0)