diff --git a/Demo/DBAwareLabeledComponentsDemo.res b/Demo/DBAwareLabeledComponentsDemo.res index 7142ae7..03e5ed9 100644 Binary files a/Demo/DBAwareLabeledComponentsDemo.res and b/Demo/DBAwareLabeledComponentsDemo.res differ diff --git a/Demo/Main.dfm b/Demo/Main.dfm index 1b63ec8..4bf8836 100644 --- a/Demo/Main.dfm +++ b/Demo/Main.dfm @@ -145,7 +145,7 @@ object MainForm: TMainForm Align = alBottom TabOrder = 1 object FontLabel: TLabel - Left = 353 + Left = 368 Top = 129 Width = 66 Height = 15 @@ -153,7 +153,7 @@ object MainForm: TMainForm Caption = 'Font Height:' end object RowLinesLabel: TLabel - Left = 363 + Left = 378 Top = 154 Width = 56 Height = 15 @@ -161,7 +161,7 @@ object MainForm: TMainForm Caption = 'Row Lines:' end object RowMarginLabel: TLabel - Left = 352 + Left = 367 Top = 186 Width = 67 Height = 15 @@ -248,7 +248,7 @@ object MainForm: TMainForm OnClick = cbCustomDrawClick end object FontTrackBar: TTrackBar - Left = 425 + Left = 440 Top = 119 Width = 133 Height = 25 @@ -309,7 +309,7 @@ object MainForm: TMainForm OnClick = rgCtl3DClick end object LineTrackBar: TTrackBar - Left = 425 + Left = 440 Top = 150 Width = 133 Height = 25 @@ -320,7 +320,7 @@ object MainForm: TMainForm OnChange = LineTrackBarChange end object RowMarginTrackBar: TTrackBar - Left = 425 + Left = 440 Top = 181 Width = 133 Height = 25 diff --git a/Packages/D12/DBAwareLabeledComponents.dproj b/Packages/D12/DBAwareLabeledComponents.dproj index 12ecd82..3688f5f 100644 --- a/Packages/D12/DBAwareLabeledComponents.dproj +++ b/Packages/D12/DBAwareLabeledComponents.dproj @@ -9,6 +9,7 @@ Win32 1 Package + DBAwareLabeledComponents true @@ -18,6 +19,11 @@ Base true + + true + Base + true + true Base @@ -61,6 +67,11 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) Debug + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + Debug + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + DEBUG;$(DCC_Define) true @@ -131,10 +142,13 @@ DBAwareLabeledComponents.dpk + + True False + False 12 diff --git a/Packages/D12/DBAwareLabeledComponents.res b/Packages/D12/DBAwareLabeledComponents.res index d6bd328..a8dad1b 100644 Binary files a/Packages/D12/DBAwareLabeledComponents.res and b/Packages/D12/DBAwareLabeledComponents.res differ diff --git a/Packages/D12/dclDBAwareLabeledComponents.dproj b/Packages/D12/dclDBAwareLabeledComponents.dproj index da5071a..06d53ea 100644 --- a/Packages/D12/dclDBAwareLabeledComponents.dproj +++ b/Packages/D12/dclDBAwareLabeledComponents.dproj @@ -9,6 +9,7 @@ Win32 1 Package + dclDBAwareLabeledComponents true @@ -18,6 +19,11 @@ Base true + + true + Base + true + true Base @@ -62,6 +68,11 @@ Debug DBAwareLabeledComponents;$(DCC_UsePackage) + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + Debug + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= + DEBUG;$(DCC_Define) true @@ -106,10 +117,13 @@ dclDBAwareLabeledComponents.dpk + + True False + False 12 diff --git a/Packages/D12/dclDBAwareLabeledComponents.res b/Packages/D12/dclDBAwareLabeledComponents.res index c46903d..5c3557d 100644 Binary files a/Packages/D12/dclDBAwareLabeledComponents.res and b/Packages/D12/dclDBAwareLabeledComponents.res differ diff --git a/README.htm b/README.htm new file mode 100644 index 0000000..880c804 --- /dev/null +++ b/README.htm @@ -0,0 +1,207 @@ + +

DBAwareLabeledComponents

+

License

+

An extended TDBGrid plus classic Delphi-VCL Editors with Boundary-Label (DB-Aware and Standard) including NumberBox

+

Actual official version 1.3.2 (VCL)

+

An advanced TDbGrid component:

+

TLabeledDbGrid is an advanced version of classic TDbGrid with a boundary Label, plus some extra features:

+
    +
  • ShowSortOrder: shows an indicator of sorting column
  • +
  • Embedeed CheckBox for boolean fields
  • +
  • Incremental search, when typing into a ReadOnly DbGrid
  • +
  • Alternate row-color
  • +
  • Custom row-colors
  • +
  • Show sort order
  • +
  • Incremental search
  • +
  • Lines per Rows (to show memo fields with multiple lines)
  • +
  • RowMargin (to enlarge heigh of any row)
  • +
+

*Example of a TLabeledDbGrid (with some extended functionality like inplace checkbox and sorting) with the label aligned TopCenter (inside the client area of the grid aligned alClient).

+

Preview Thumbnails Dark

+

This library contains also the classic VCL editors (standard and data-aware) with the addition of a “label” attached to the component itself (like the native component TLabeledEdit).

+

It is no longer necessary to keep the Label “connected” and “aligned” by hand to the editor: on every component you can specify 3 simple properties:

+
    +
  • BoundCaption
  • +
  • BoundLabel.Labelposition (default lpTopLeft)
  • +
  • BoundLabel.LabelSpacing (default 1)
  • +
+

The label can be positioned with 12 alignements: +lpTopLeft, lpTopCenter, lpTopRight, lpBottomLeft, lpBottomCenter, lpBottomRight, lpLeftTop, lpLeftMiddle, lpLeftBottom, lpRightTop, lpRightMiddle, lpRightBottom

+

TLabeledButtonEdit:

+

Also available for D10.3 to latest, TLabeledButtonEdit and TLabeledDBButtonEdit are a classic editors with a button inside (on the right). For Date Fields the button opens automatically a Popup-Calendar.

+

Look at those examples, showing all the components with different Label alignments: the demo is available into Demo Folder

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SampleDescription
DemoDataAwareDbGridLinesPerRow3Example of LabeledDbGrid with LinesPerRow = 3 to show multiline content of memo fields
DemoDataAwareDbGridRowMargin15Example of LabeledDbGrid with RowMargin = 15 to to change height of grid Row. Fully compatible with Styles (light and dark)
DemoDataAwareTopLeftExample of collection of Dataaware components with label aligned to “TopLeft”
DemoDataAwareNumberEditorsLeftMiddleExample of LabeledDBCurrencyEdit and LabeledDBNumberBox (only for 10.4.2): Dataware components for numeric input (from right to left) with label aligned to “LeftMiddle”
Preview Thumbnails DarkExample of collection of Standard components with label aligned to “TopRight”
Preview Thumbnails DarkExample of collection of components with label aligned to “BottomCenter”
Preview Thumbnails DarkAll components are fully VCL styles compatible
+

A complete Demo is available in Demo Folder.

+

Support for new NumberBox component

+

TNumberBox component (available from D10.4.2) is the new component for advanced numeric input. In this library you can find:

+
    +
  • TDBNumberBox: the standard component with classic DataAeware support (DataSource + DataField) without Label.
  • +
  • TLabeledNumberBox: a TNumberBox component with boudary label
  • +
  • TLabeledDBNumberBox: a TDBNumberBox with boudary label
  • +
+

Available from Delphi XE3 to Delphi 12 (32bit and 64bit platforms)

+

Delphi Support

+

Related links: https://www.embarcadero.com/ - https://learndelphi.org/

+

INSTALLATION

+

Clone repository, open Package Group “PackageGroup.groupproj” of your Delphi version located in:

+

DBAwareLabeledComponents\Packages\DXXX

+

Build RunTime package: DBAwareLabeledComponents.dproj

+

Install DesignTime package: dclDBAwareLabeledComponents.dproj

+

Remember to add those folders to Search Path:

+

{InstallDir}\Source

+

DOCUMENTATION

+

Coming soon, into Wiki section.

+

RELEASE NOTES

+

08 Jul 2024: ver.1.3.2

+
    +
  • Fixed error when adding TLabeledNumberBox to a form.
  • +
+

13 Jan 2024: ver.1.3.1

+
    +
  • Fixed DbGrid rendering
  • +
  • Updated Copyright
  • +
+

RELEASE NOTES

+

21 Aug 2023: ver.1.3.0

+
    +
  • Added support for Delphi 12
  • +
  • Added WrapAllText, ColMoving and IncrementalSearchType to TLabeledDbGrid
  • +
  • Fixed 64Bit issue for TLabeledDBComboBox
  • +
+

05 Sep 2022: ver.1.2.2

+
    +
  • Refactoring of rendering TLabeledDBGrid to fix some problems when dgRowSelect is active
  • +
+

19 Aug 2022: ver.1.2.1

+
    +
  • Fixed checkbox drawing in “Windows” style, using rowmargin and/or LinesPerRow
  • +
  • Fixed drawing cell right aligned
  • +
  • Fixed Setting custom cursor for Grid
  • +
+

15 Jun 2022: ver.1.2.0

+
    +
  • Added TLabeledButtonEdit and TLabeledDBButtonEdit (from Delphi 10.1)
  • +
  • Updated Demo with TLabeledButtonEdit and TLabeledDBButtonEdit examples
  • +
  • Added Packages for Delphi 10.1 and Delphi XE8
  • +
+

17 May 2022: ver.1.1.0

+
    +
  • Added LinesPerRow and RowMargin to TLabeledDbGrid
  • +
  • Updated Demo with full features of TLabeledDbGrid
  • +
  • Changed LibSuffix for Packages (D10.4 and D11)
  • +
  • Renamed Package Description to “Ethea: Dataaware Labeled Components”
  • +
+

10 Oct 2021:

+
    +
  • Fixed LabeledDbGrid for Rendering selected cell with Windows 11
  • +
  • Fixex LabeledDbGrid columns draw in High-DPI app
  • +
+

03 Sep 2021:

+
    +
  • Added support for Delphi 11
  • +
+

25 Apr 2021: version 1.0.0

+

Components released:

+

only for D10.4.2 and above

+
    +
  • TDBNumberBox
  • +
  • TLabeledNumberBox
  • +
  • TLabeledDBNumberBox
  • +
+

only for D10.1 and above

+
    +
  • TLabeledDBButtonEdit
  • +
  • TLabeledButtonEdit
  • +
+

for all Delphi versions (from XE3)

+
    +
  • TLabeledColorGrid
  • +
  • TLabeledCurrencyEdit
  • +
  • TLabeledDBCurrencyEdit
  • +
  • TLabeledSpinEdit
  • +
  • TLabeledRichEdit
  • +
  • TLabeledCheckListBox
  • +
  • TLabeledEditEx (similar to TLabeledEdit)
  • +
  • TLabeledComboBox
  • +
  • TLabeledListBox
  • +
  • TLabeledMemo
  • +
  • TLabeledDBEdit
  • +
  • TLabeledDBLabel
  • +
  • TLabeledDBComboBox
  • +
  • TLabeledDBListBox
  • +
  • TLabeledDBMemo
  • +
  • TLabeledDBImage
  • +
  • TLabeledDBLookupListBox
  • +
  • TLabeledDBLookupComboBox
  • +
  • TLabeledDbGrid
  • +
  • TLabeledDBRichEdit
  • +
  • TLabeledDBCtrlGrid
  • +
  • TLabeledDBListView
  • +
  • TLabeledMaskEdit
  • +
  • TLabeledRadioGroup
  • +
  • TLabeledImage
  • +
  • TLabeledColorBox
  • +
diff --git a/README.md b/README.md index 27d1216..2eb7693 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ An extended TDBGrid plus classic Delphi-VCL Editors with Boundary-Label (DB-Aware and Standard) including NumberBox -### Actual official version 1.3.1 (VCL) +### Actual official version 1.3.2 (VCL) An advanced TDbGrid component: @@ -83,6 +83,9 @@ _{InstallDir}\Source_ Coming soon, into Wiki section. ### RELEASE NOTES +08 Jul 2024: ver.1.3.2 +- Fixed error when adding TLabeledNumberBox to a form. + 13 Jan 2024: ver.1.3.1 - Fixed DbGrid rendering - Updated Copyright diff --git a/Source/Vcl.BoundLabel.pas b/Source/Vcl.BoundLabel.pas index 8b6e373..a698334 100644 --- a/Source/Vcl.BoundLabel.pas +++ b/Source/Vcl.BoundLabel.pas @@ -461,6 +461,8 @@ function GetEditControlFont(AEditControl: TControl): TFont; else if AEditControl is TLabeledDBImage then Result := TLabeledDBImage(AEditControl).Font {$IFDEF D10_4+} + else if AEditControl is TLabeledNumberBox then + Result := TLabeledNumberBox(AEditControl).Font else if AEditControl is TLabeledDBNumberBox then Result := TLabeledDBNumberBox(AEditControl).Font {$ENDIF}