Ehlib 6.1: A Powerful and Intuitive Library for Delphi and C++ Builder
Ehlib is a library of components and classes for Delphi and C++ Builder that aims to increase the capacity and functionality of the client part of database applications. Ehlib 6.1 contains components for Borland Delphi 7, 9, 2005, 2006, CodeGear Delphi 2007, CodeGear RAD Studio 2009, Embarcadero RAD Studio 2010, XE, X2 and RAD Studio XE3[^4^].
One of the most advanced components of Ehlib is TDBGridEh, which provides all the functionality of TDBGrid and adds several new features, such as selecting records, columns and rectangle areas, special titles that can correspond to several or all columns, footer that can show sum, count or other field values, automatic column resizing, changing row and title height, and more[^4^].
Ehlib also offers other components for displaying and editing data in a tabular format, such as TDBVertGridEh, TPrintDBGridEh, TDBLookupComboboxEh, TDBSumList and others. Ehlib supports printing and exporting data to various formats, such as Text, Csv, Html, Rtf or Xls[^4^] [^6^].
Ehlib is 100% native VCL library written in Delphi language. It has a high speed of development and performance, as well as a great number of examples, instructions and help-files. Ehlib is easy to use and debug, and it has a beautiful and user-friendly interface with impressive features of information processing[^4^].
If you are looking for a powerful and intuitive library for Delphi and C++ Builder that can handle tabular data in an efficient and elegant way, you should definitely try Ehlib 6.1. You can download the evaluation version from here or buy the full version from here. You can also find more information about Ehlib on its official website: https://ehlib.com/.
In this article, we will show you some examples of how to use Ehlib components in your Delphi or C++ Builder projects. We will focus on TDBGridEh, the most versatile and powerful component of Ehlib.
Creating a simple grid
To create a simple grid with TDBGridEh, you need to follow these steps:
Drop a TDBGridEh component on your form.
Drop a TDataSource component on your form and set its DataSet property to the dataset you want to display in the grid.
Set the DataSource property of TDBGridEh to the TDataSource component you just created.
Optionally, you can customize the appearance and behavior of the grid by using the properties and events of TDBGridEh.
That's it! You have created a simple grid that can display and edit data from your dataset. You can run your application and see the result.
Adding titles and footers
One of the features that TDBGridEh offers is the ability to add titles and footers to the grid. Titles are special rows that can span several or all columns and show additional information or captions. Footers are similar to titles, but they are displayed at the bottom of the grid and can show aggregate values, such as sum, count, average, etc.
To add titles and footers to your grid, you need to follow these steps:
Set the TitleRows property of TDBGridEh to the number of title rows you want to add. For example, if you want to add one title row, set it to 1.
Set the FooterRowCount property of TDBGridEh to the number of footer rows you want to add. For example, if you want to add one footer row, set it to 1.
Use the Cells property of TDBGridEh.TitleRows or TDBGridEh.FooterRows to access and modify the cells of each title or footer row. You can set the text, alignment, font, color and other attributes of each cell. You can also use the ColSpan or RowSpan properties of each cell to make it span several columns or rows.
Optionally, you can use the OnGetFooterParams or OnGetTitleParams events of TDBGridEh to dynamically change the appearance and content of each footer or title cell.
That's it! You have added titles and footers to your grid. You can run your application and see the result. aa16f39245