EhLib使用说明

KeyLife富翁笔记
作者 : wab
标题 : EhLib使用说明(转载)
关键字:
分类 : 技术文档
密级 : 公开
(评分: ★★ , 回复: 3, 阅读: 2620) »»

一、如何在程序中确定Ehlib定义的报表表头颜色?

在执行打印之前,加上下面的语句:
DBGridEh1.FixedColor:=clLime;//clLime可以换成你想要的颜色比如clRed是红色等等
PrintDBgridEh1.Options:=[pghColored,pghFitingByColWidths];//方括号里的"pghColored"是必需的,其它的根据你的需要决定取舍
================================================================

二、Ehlib中的PrintDBGridEh如何印页码,即第几页共几页

PrintDBGridEh.PageFooter.CenterText:='第&[Page]页 共&[Pages]页'
在对象管理器中的相关位置有设
================================================================

三、本人刚学习使用ehlib包,现在要实现类似ehlib所带demo1中一个功能:点击dbgrid某列值
的下拉按纽(可以设置),弹出一个下拉列表(其内容是另一个dataset的)。我看demo1中
好象是使用了DBLookupComboboxEh,可我参看demo1怎么设置也不行,请指教。谢谢。

呵呵,这个效果没有用DBLoookupComboBoxEh,它是利用查找字段实现的。
它在Query1中,对应VName字段,增加了一个叫VName1的查找字段,这个
字段从qrVendors查找相关的数据,再在DBGridEh1显示VName1,这样显示
就是那种效果了。
===============================================================

四、Ehlib 怎样固定某几列?

只要设置dbGridEh的FrozenCols属性为几列即可.


EhLib 用户指南   
内容  


--------------------------------------------------------------------------------



3 使用 TDBGridEh 组件
理解 TDBGridEh, TDataLink 以及 TDataSet.
All below text in equal degrees pertains as to TDBGridEh component as to TDBGrid component.
A TDBGridEh control lets you view and edit records in a dataset in a tabular grid format.
TDBGridEh does not story data in in itself, it only show data from dataset via TDataLink object. Every database control have internal TDataLink object to interaction with dataset. You can connect TDBGridEh to dataset using DataSource property. If you already use TStringGrid component you can see that data shows in TStringGrid and in TDBGridEh very similarly, but mechanism that use to show data in    TStringGrid and in TDBGridEh very different. In TStringGrid count of rows is equal of rows in array of strings while in TDBGridEh (and TDBGrid) count of rows always not more then count of visible rows and although vertical scrollbar can display thumb position regarding the count of record in dataset it take info not from grid but directly from dataset. TDataSet don't allows us to work with data as with array of data i.e. we can not quickly get value of the field from certain record, some types of dataset have not even such notion as record number (in such datasets we can only know that we inhere in the begin of dataset or in the end of its or somewhere between, in that case DBGrid shows vertical vertical scrollbar only in three positions). But to have possibility to draw several record simultaneously TDataLink object allows to have buffer of records (record buffer window) with quick readonly access. DBGrid use this possibility of datalink and set size of record buffer window equal of count of visible rows in grid. We can not control what record must be first in this buffer, DataLink itself scroll record buffer window then we navigate through the dataset and it control the scrolling of record buffer window as that the active record as always in record buffer window. It is a reason why the active record change position when users change thumb position of vertical scrollbar using mouse.

TDBGridEh和纵向滚动条
If you works with different type of dataset you can notice that for some type of dataset DBGrid show vertical scrollbar validly but for over vertical scrollbar have only three position independently of record count in dataset. To set vertical scrollbar accomodation DBGrid use RecordCount and RecNo property of DataSet component. But some dataset and even same dataset under some condition holds -1 in    RecordCount and RecNo. DataSet function IsSequenced indicates whether the underlying database table uses record numbers to indicate the order of records. When IsSequenced returns True, applications can safely use the RecNo property to navigate to records in the dataset and DBGrid use RecNo property to show thumb position in vertical scrollbar. But when IsSequenced returns False DBGrid can not define current record position and show vertical scrollbar in three positions. DBGridEh component have possibility to show proportional scrollbar for no sequenced dataset. To do it need to activate SumList and create list of record bookmars. Set SumList.Active to True and SumList.VirtualRecords to True. SumList will run through dataset and create list of    record bookmarks, if you use client/sever technology to access database SumList will force dataset to fetch all records, so it operation can take much time. Keep in mind that VirtualRecords will work only for full relationship bookmarks dataset, it means that DataSet.ComapreBookmark function has to return > 0 if bookmark1 > bookmark1 (i.e. record to which indicates bookmark1 have to be after record to which indicates bookmark1), = 0 if bookmark1 = bookmark1, < 0 if bookmark1 = bookmark1. TBDEDataSet in most cases support full relationship bookmarks.


定制网格标题
复杂标题
TDBGridEh 允许在多列上创建标题,例如:

设置 DBGridEh.UseMultiTitle 属性为 True 并且填充字段的标签或列标题的标题,可以使用下面的规则:字段标签中的文本部分或列标题必须由几部分组成,并且用 "|" 分割,几个列的每一个通用部分都设置为相同。其它字段或标题必须在相应的部分包含同样的文本。  

例如:

Field1.DisplayLabel := 'Title1|SubTitle1';
Field2.DisplayLabel := 'Title1|SubTitle2';
    或
DBGridEh.Columns[0].Title.Caption := 'Title1|SubTitle1';
DBGridEh.Columns[1].Title.Caption := 'Title1|SubTitle2';
按钮式标题
设置Column.Title.TitleButton 为 True可以强制标题单元为按钮式。写 OnTitleBtnClick事件来控制用户单击标题单元时的操作。  

在标题中显示位图
To show bitmap in titles instead of caption use TitleImages property of TDBGridEh and ImageIndex property of TColumnTitleEh.

自动用位置标识排序标题.
TDBGridEh allows to show special    sortmarking bitmaps (small triangles) in the right part of title cell. In order to automatically marking title by sortmarking bitmaps add dghAutoSortMarking to OptionsEh property. Add dghMultiSortMarking too in order to allow sortmarking several columns simultaneously. Set Column.Title.TitleButton to true for titles which will have possibility to change sortmarkers at run time. At runtime clicking on title will change sortmarking. Holding Ctrl key allows to mark several columns simultaneously. After user change sormarking grid call OnSortMarkingChanged event. You can write this event to change sorting and reopen in dataset. Use SortMarkedColumns property to access to sortmarked columns.

标题属性的默认值
使用TDBGridEh.ColumnDefValues.Title来设置标题属性的默认值。

定制网格页脚
页脚以及统计值
TDBGridEh allows to show special row (footer) or rows at bottom part. Use FooterRowCount property to specify the number of footer rows in the grid. Use Footer or Footers property of TColumnEh object to specify information which need to show in footer cells. Footers property useful then you have more then one footer rows. Footers is a collection of TColumnFooterEh objects where information from i-th aliment of collection will be show in i-th cell of footer column. In footer cell, it is possible to show: Sum value for specified field, record count, value of a specified field or static text. Use property Footer.ValueType or Footers[i].ValueType to specify which type of value will be show in footer cell. If ValueType = fvtStaticText, then set the property Value to specify text which need to show. If ValueType = fvtFieldValue, then you need to set property FieldName to specify field, value of which need to show. To force grid to calculate total values need to activate SumList (DBGridEh.SumList.Active := True). Set ValueType to fvtSum and grid must to show sum value of the column field in the footer cell, you can also specify Column.Footer.FieldName to calculate total value of the other field. Set ValueType to fvtCount to force grid to show count of records in the footer cell.


定制网格数据单元
在数据单元中显示字段值为图形。
TDBGridEh allows to show bitmaps from TImageList component depending on field values. To show bitmaps depending on field values need: Fill list of field values to Column.KeyList property (every value in separate line) and set Column.ImageList property to ImageList control that has the bitmap in according index. Set Column.NotInKeyListIndex to index of bitmap that will be shown if field's value does not correspond to any value in KeyList (for instance you can set index of image for Null field value). At run time you are not allowed to edit bitmap in column cell. Use blank key and mouse click to set next value from Column.KeyList to the field; Shift-blank key and Shift-Mouse click to set previous value from Column.KeyList. Set Column.DblClickNextval to True have allows to change value on mouse double click.

检查框式的逻辑及非逻辑值
Grid automatically shows checkboxes for boolean field. To show checkboxes for non boolean fields fill first line of Column.KeyList property that corresponds to the checked state of the checkbox, second line - non checked state, and set Column.Checkboxes ptoperty to True. Line of KeyList can represent more than one value in a semicolon-delimited list of items.

数据行高度
使用 RowHeight 和 RowLines 属性来指定数据行高。完整的数据行高 = 行线高度+行高。设置 RowSizingAllowed 为 True 以允许可以在运行是使用鼠标来改变行高。

设置Column.WordWrap为True可以使数据行中文本多行显示。如果行高>文本行,它就换行。

显示备注字段
设置 DrawMemoText to True来显示文本式的备注字段。.

定制单元格字体及颜色
TDBGridEh 中的 Font 和 Color 属性描述了数据网格中绘制单元格的字体和颜色。
TColumnEh 中的 Font 和 Color 属性描述了指定列中绘制单元格的字体和颜色。

事件定制单元格字体及颜色
有几个事件可以让你能够在绘制单元格前定制单元格字体和颜色。你可以写TDBGridEh的OnDrawColumnCellEvent事件句柄来在控制在网格单元中绘制数据。你可以使用Canvas属性的方法来绘制单元格。但是如果你只想改变字体或颜色的属性,我建议你使用下面的事件。你可以写TDBGridEh的OnGetCellParams事件来控制在绘制数据单元以前所指定的操作。你可以改变绘制字体及背景色。这个事件适合你在想改变整行的字体或颜色时使用。如果你想改变指定列中单元格的属性,你可以使用TColumnEh.OnGetCellParams。写这个事件用来控制在一列数据单元被重绘或编辑时的操作。在一列数据单元被重绘以前,你可以改变绘制字体,背景色,对齐方式,图像索引,文本或检查框。在编辑一列数据单元以前,你可以改变编辑字体,背景色,文本或只读状态。  

列属性的默认值

使用ColumnDefValues属性来设置列属性的默认值。新创建的列将从ColumnDefValues属性中获得属性值,并且直到第一次为其指定值为止。


在网格的适当位置放置编辑器.
在下拉列表中显示几个字段。
在下拉列表中显示几个下拉字段,需要设置列的LookupDisplayFields属性到字段的Semicolons属性来分割多个字段名。命名为Column.Field.LookupResultField的属性必须位于LookupDisplayFields列表中。多字段的下拉列表只能应用于下拉字段。

显示下拉方式的列

你可以通过KeyList 和 PickList 属性在相关的的字段中显示其它文本。KeyList显示包含在字段的值而非PickList索引所包含的值。 Column.NotInKeyListIndex to index of text from PickList that will be shown if field value do not contain in KeyList (for instance you can set index of text for Null field value). Set Column.DblClickNextval to True to change value on mouse double click.

下拉式计算器
对于 TDateField 和 TDateTimeField 字段,inplace 编辑器将显示下拉按钮以显示显示下拉计算器。设置 Column.ButtonStyle 为 cbsNone 以禁止显示下拉按钮。

设置编辑器颜色和字体
Inplace编辑器可以设置数据单元的颜色和字体。数据单元使用OnGetCellParams 事件来控制列的颜色和字体。 Inplace 编辑器在行高>一行的高度时自动设置为多行模式并且将列的属性 WordWrap 设置为True.


自动填充网格列宽到网格客户区
设置AutoFitColWidths为True以自动重置列宽来设置网格的宽度等于客户区宽度。 MinAutoFitWidth 属性决定网格的最小宽度,列宽将会被重新计算。
3D或平面外观
使用 OptionsEh 属性来显示/隐藏固定的3D框架,冷区,页脚以及数据行。

使用 Flat 属性来设置用平面方式显示数据网格。

从多种格式导入/导出数据到TDBGridEh。
EhLib 的函数集可以从DBGridEh导出数据到Text, Csv, HTML, RTF, XLS以及其内部格式。它可以保存数据到流(TStream对象)或文件。  

例子
Pascal: SaveDBGridEhToExportFile(TDBGridEhExportAsText,DBGridEh1,'c:\temp\file1.txt',False);
C++: SaveDBGridEhToExportFile(__classid(TDBGridEhExportAsText),DBGridEh1,"c:\\temp\\file1.txt",false);

EhLib 的函数集可以从 Text以及其内部格式的数据导入到DBGridEh的数据集中。它可以从文件中读取数据或读取数据到流(TStream对象)。  

其它特性
用lookup 编辑器,你可以在运行时清空(设置为Null) LookupKeyField 值。比如选择整个文本然后按Delete键。  

冷区
冷区是数据网格列集左边显示的不可滚动的区域。与固定列不同的是,冷区的列可以获得编辑焦点。可以通过设置FrozenCols属性来设置右边不可滚动的列集。

增量搜索

TDBGridEh 允许用户在网格列中实现特定的“增量”搜索。当用户进入增量搜索时他可以显示字符以及网格,并且在当前的列中查找文本。使用 dghIncSearch 和 dghPreferIncSearch的值(在OptionsEh 选项中) 在数据网格中操作增量搜索。 dghIncSearch 值允许在数据网格中进行增量搜索。运行时你能够使用下面的键进行增量搜索:

    Ctrl+F - 开始增量搜索。
    Ctrl+Enter - 查找下一个匹配记录。
    Ctrl+Shift+Enter - 查找前一个匹配记录。

如果OptionsEh选项中的 dghIncSearch 是只读的,那么网络将自动设置增量模式在第一次按键以及1.5秒后返回普通模式。 dghPreferIncSearch 值决定网格设置自动增量搜索模式在第一次按键时替代单元编辑。

水平或垂直滚动条
使用 VertSctollbar, HorzSctollbar 属性来显示/隐藏以及跟踪水平或垂直滚动条。

多选
TDBGridEh 允许在选定的区域上进行选择记录,列以及矩形区域等操作:

允许多选会影响下面这些属性:

    Options选项中的dgMultiSelect属性 - 设置是否允许多选。

    Options选项中的dghClearSelection 属性- 设置在用户移到下一个单元时是否清除已选记录。

    Options选项中的EditActions属性 -设置用户可以在已选记录上执行哪些操作(比如,拷贝,剪切,删除,粘贴,全选等)。

    Options选项中的AllowedSelections属性-设置允许选定记录的类型(比如,行,列,矩形区域等)。

    Options选项中的Selection属性-设置一个当前的多选状态,已选记录,列或矩形区域以及存取它们的属性和函数。  

从注册表或ini文件中保存或恢复网格和列的层次。
TDBGridEh 有一个常规设置来从注册表或ini文件中保存和恢复网络以及列的层次:

    RestoreColumnsLayout      - 从注册表中恢复列的次序,宽度,排序标志。

    RestoreColumnsLayoutIni      - 从ini文件中恢复列的次序,宽度,排序标志。

    RestoreGridLayout      - 从注册表中恢复列的次序,宽度,可视,排序标志,排序索引或行高。

    RestoreGridLayoutIni      - 从ini文件中恢复列的次序,宽度,可视,排序标志,排序索引或行高。

    SaveColumnsLayout      - 保存列的次序,宽度,排序标志到注册表中。

    SaveColumnsLayoutIni      - 保存列的次序,宽度,排序标志到ini文件中。

    SaveGridLayout      - 保存列的次序,宽度,可视,排序标志,排序索引或行高到注册表中。

    SaveGridLayoutIni      - 保存列的次序,宽度,可视,排序标志,排序索引或行高到ini文件中。

当前版本的TDBGridEh不支持的特性:
这个版本的TDBGridEh不支持下面的特性:

    TDBGridEh 不能设置每一个数据窗口中单独行的行高。

    TDBGridEh 不能象TreeView那样工作。它不能拥有节点和枝叶。

    TDBGridEh 不能横向或纵向合并数据单元。

将已存在的TDBGrid组件转换为TDBGridEh组件:

尽管TDBGridEh并不是从TCustomDBGrid组件继承而来的,但是在TDBGridEh和TDBGrid中还是有一些相似的属性。

它允许仅用一点点代价来转换已存在的TDBGrid组件到TDBGridEh。

可以按照下面的提示来转转换已存在的TDBGrid组件到TDBGridEh:

在Delphi的IDE中打开包含有TDBGrid组件的应用程序。

设置视图方式为文本方式(Alt-F12)。

将所有的TDBGrid对象改名为TDBGridEh('比如,将object DBGrid1: TDBGrid'改为 'object DBGrid1: TDBGridEh')

重新编译你的应用程序。


--------------------------------------------------------------------------------

向前
向后
文档翻译:唐伟忠

内容  

EhLib 用户指南   
Contents  


--------------------------------------------------------------------------------



5 使用 TDBSumList 组件
TDBSumList说明
你可以使用TDBSumList在可视动态变化数据集中进行记录统计。在你想查看的数据集中设置相关的数据字段,然后写 SumListChanged 事件来指定在TDBSumList发生改变后所要做的操作。TDBSumList 的 SumCollection 属性上一个 TDBSum 对象容器。每个 TDBSum 对象是一个可以指定集合值的元件。 FieldName 和 GroupOperation 决定了集合值的类型,SumValue 控制当前的集合值。

TDBSumList 被埋藏于 DBGridEh 组件中,因此所的下面有关TDBGridEh.SumList 的说明与TDBGirdEh的TDBGridEh.SumList 属性的说明是一样的。

如何工作以及为什么有时SumList的集合值计算不正确?
你知道 data-aware 控件与数据集是通过 TDataLink 对象相连接的。 TDataLink 不允许快速重新计算集合值。例如,当从数据集中删除记录时,数据集发送deDataSetChange事件给所有的TDataLink对象,在当前局部过滤发生改变时,同样的事件也被发送了。因此当 TDataLink 接收到该事件时,它不得不在所有的数据集中重新计算集合值,甚至于仅从数据集中删除一条记录。在激活后, TDBSumList 重载了数据集的下列事件: OnAfterEdit, OnAfterInsert, OnAfterOpen, OnAfterPost, OnAfterScroll, OnBeforeDelete, OnAfterClose。这种方法避免了在所有的数据集中它。在不需要它时,又会出现其它的问题,比如: T
    运行时指定这些事件。在指定上述事件之一以前,关闭 SumList。
    在下面的情形下,SumList 发出存取错误信息。 SumList 试着向数据集返回事件,但数据集数据并未被删除。在SumList(或网格)以及数据集放置在不同的窗体(数据模块)这种情况下,可以显示数据。在这种情况下,试着在从数据集或数据模块中数据集数据被删除时关闭SumList。
    如果你使用SetRange或ApplyRange事件,SumList 将不能跟踪数据集中发生的变化。但可以调用 SumList.RecalAll 方法。
    在非BDE数据集的主/明细表中,SumList 不能跟踪数据变化。在主数据集激活状态数据集发生变化后,调用 SumList.RecalAll 方法。
在任何其它情况下,如果你发现了其它SumList的计算值不正确,你都可以调用 RecalAll方法。


--------------------------------------------------------------------------------

向前
向后
翻译:唐伟忠

Contents  

EhLib 用户指南   
Contents  


--------------------------------------------------------------------------------



5 使用 TDBSumList 组件
TDBSumList说明
你可以使用TDBSumList在可视动态变化数据集中进行记录统计。在你想查看的数据集中设置相关的数据字段,然后写 SumListChanged 事件来指定在TDBSumList发生改变后所要做的操作。TDBSumList 的 SumCollection 属性上一个 TDBSum 对象容器。每个 TDBSum 对象是一个可以指定集合值的元件。 FieldName 和 GroupOperation 决定了集合值的类型,SumValue 控制当前的集合值。

TDBSumList 被埋藏于 DBGridEh 组件中,因此所的下面有关TDBGridEh.SumList 的说明与TDBGirdEh的TDBGridEh.SumList 属性的说明是一样的。

如何工作以及为什么有时SumList的集合值计算不正确?
你知道 data-aware 控件与数据集是通过 TDataLink 对象相连接的。 TDataLink 不允许快速重新计算集合值。例如,当从数据集中删除记录时,数据集发送deDataSetChange事件给所有的TDataLink对象,在当前局部过滤发生改变时,同样的事件也被发送了。因此当 TDataLink 接收到该事件时,它不得不在所有的数据集中重新计算集合值,甚至于仅从数据集中删除一条记录。在激活后, TDBSumList 重载了数据集的下列事件: OnAfterEdit, OnAfterInsert, OnAfterOpen, OnAfterPost, OnAfterScroll, OnBeforeDelete, OnAfterClose。这种方法避免了在所有的数据集中它。在不需要它时,又会出现其它的问题,比如: T
    运行时指定这些事件。在指定上述事件之一以前,关闭 SumList。
    在下面的情形下,SumList 发出存取错误信息。 SumList 试着向数据集返回事件,但数据集数据并未被删除。在SumList(或网格)以及数据集放置在不同的窗体(数据模块)这种情况下,可以显示数据。在这种情况下,试着在从数据集或数据模块中数据集数据被删除时关闭SumList。
    如果你使用SetRange或ApplyRange事件,SumList 将不能跟踪数据集中发生的变化。但可以调用 SumList.RecalAll 方法。
    在非BDE数据集的主/明细表中,SumList 不能跟踪数据变化。在主数据集激活状态数据集发生变化后,调用 SumList.RecalAll 方法。
在任何其它情况下,如果你发现了其它SumList的计算值不正确,你都可以调用 RecalAll方法。


--------------------------------------------------------------------------------

向前
向后
翻译:唐伟忠

Contents  

EhLib    用户指南

内容

4    使用    TPrintDBGridEh    组件
在 Delphi 的 IDE 组件面板中选择 TPrintDBGridEh 并拖放其到 form 上。在     其 DBGridEh 属性中设置为相应的    TDBGridEh    组件。使用    Print    以及    Preview    方法在打印机上打印网格或者在预览窗体中预览网格。
网格前以网格后的 RTF 文本
TPrintDBGridEh    允许在打印 / 打印预览网格前或网格后的 RTF 文本。使用 AfterGridText    以及 BeforeGridText    属性来指定文本。     你可以在打印 / 打印预览时通过 BeforeGridText 和 AfterGridText    属性来替换文本内容。   
当前版本的 TPrintDBGridEh    不支持的特性。
这个版本不支持下面的特性:
    TPrintDBGridEh    不能在一页中打印 / 打印预览多个网格。
问答列表 :
问 :    怎样进行横向打印 / 打印预览?
答 : TPrintDBGridEh    并没有专六的属性来设置页面特性。在调用打印或打印预览方法前,你必须设置你将要执行打印的打印源( Orientation )。
uses    ......, PrViewEh, Printers.
..............
procedure    TForm1.bPreviewClick(Sender: TObject);
begin
PrinterPreview.Orientation := poLandscape;
PrintDBGridEh1.Preview;
end ;

EhLib 9.1.024 源码版本,自行编译 EhLib 9.1 Build 9.1.024 Professional Edition. ---------------------------------------------- The Library contains components and classes for Borland Delphi versions 7, 9, Developer Studio 2006, Delphi 2007, Embarcadero RAD Studio 2009-XE10.2, Lazarus. TABLE OF CONTENTS ----------------- Overview Installation Library Installation Help Demonstration Programs Registering and Prices Other information About author Where to start. ------------------- Start overview of the library with the main Demo project .\Demos\Bin\MainDemo.Exe. (Compiled Demo files are available in the Evaluation version of the library) If you've used previous versions of the library, then you can read a summary of the new features and changes in the file history-eng.html. More detail about new features in this version of the library can be found in the file - About EhLib 9.1 Eng.doc To install a new version of the library in the IDE, use the installation program .\Installer\EhLibInstaller.exe If, at the installation have any problems, write a letter to ehlib support address support@ehlib.com You can also install the files in the library IDE manually, as described in Section 2. Installation Library After installation, make sure the operability of all installed components. To do this, open the IDE, compile and launch a major demonstration project .\Demos\MainDemo\Project1_XE2.dpr Read next file for full instructions of working with the library components: .\Hlp\ENG\"EhLib - Users guide.doc" Read about EhLib for Lazarus in the file - Lazarus<*>\readme.txt Overview -------- The Library contains several components and objects. TDBGridEh component TDBGridEh provides all functionality of TDBGrid and adds several new features as follows: Allows to select records, columns and rectangle areas. Special titles that can correspond to several/all columns. Footer that is able to show sum/count/other field values. Automatic column resizing to set grid width equal client width. Ability to change row and title height. Allows automatic broken of a single line long title and data row to a multiline. Title can act as button and, optionally show a sort marker. Automatically sortmarking. Ability to truncate long text with ellipsis. Lookup list can show several fields. Incremental search in lookup fields. Frozen columns. DateTime picker support for TDateField and TDateTimeField. Allows to show bitmaps from TImageList depending on field value. Allows to hide and track horizontal or vertical scrollbars. Allows to hide columns. Allows to show 3D frame for frozen, footer and data rows. Allows to draw memo fields. Multiline inplace editor. Proportional scrolling independently of sequenced of dataset. Automatically show checkboxes for Boolean fields. Allows to show checkboxes for other type of fields. Has a procedures to save and restore layout (visible columns, columns order, columns width, sortmarkers, row height) in/from registry or ini file. Allows to show hint (ToolTips) for text that don't fit in the cell. Allows to export data to Text, Csv, HTML, RTF, XLS and internal formats. Allows to import data from Text and internal formats. Can sort data in various dataset's. Can filter data in various dataset's. When DBGridEh is connected to DataSet of TMemTable type it allows: To view all data without moving active record. To display a tree-type structure of TMemTable records. To form list of values in dropdown list of SubTitle filter automatically. To create grouping records basing on the selected coulmns. TDBVertGridEh component Component to show one record from dataset in Vertical Orientation. Have a special column to show Field Captions Can customize inplace editor and data of the cell like in DBGridEh. TDBLookupComboboxEh component Provides all functionality of TDBLookupCombobox and adds several new features as follows: Can have flat style. Allows assign values as to KeyValue property just and to display Text property. Allows to type (assign) values to Text property not contained in data list (Style = csDropDownEh). Allows to hold KeyValue and Text as not affecting to each other values. Take effect when KeyField, ListField, ListSource, DataField and DataSource properties is empty. Drop down list can: Show titles, Have sizing grip, Automaticaly set width as sum of DisplayWidth of the list fields (Width = -1), Automaticaly drops on user pressed the key. Edit button can: Show DropDown, Ellipsis or Bitmap image. Have specified width. Have additional events: OnKeyValueChanged, OnButtonClick. TDBSumList component This component is intended for totaling sums and amounts of records in a TDataSet with dynamic changes. Component keeps a list of TDBSum objects, which contains types of group operations (goSum or goCount) and name sum field (goCount name of field is unnecessary). TPrintDBGridEh component TPrintDBGridEh provides properties and routines for preview and print of TDBGridEh component with several features: Ability to expand rows vertically until all text is printed. Ability to scale grid to fit it to page width. Ability to print/preview title for grid. Ability to print/preview page header and page footer where you can specify macros for current page, current date, current time and/or static text. Automatically print/preview multiselected area of TDBGridEh if it area is not empty. Ability to print/preview rich text before and after grid. TPreviewBox component TPreviewBox lets you create a customizable runtime preview. TPrinterPreview object TPrinterPreview lets you to record printable data in buffer for following output them on screen and to printer. TPrinterPreview have all functions and properties as in TPrinter object. You can use TPrinterPreview object similarly of TPrinter except some details. In TPrinter Printer.Canvas.Handle and Printer.Handle is the same but in TPrinterPreview PrinterPreview.Canvas.Handle represent the metafile in that is recored the data and PrinterPreview.Handle represent Printer.Handle. That is mean that you have to use PrinterPreview.Canvas.Handle for draw operation (DrawText, DrawTexteEx, e.t.c.) and use PrinterPreview.Handle in functions that return information about printer facilities (GetDeviceCaps, e.t.c.). Global function PrinterPreview returns default PrinterPreview object and shows data in default preview form. TDBEditEh component represents a single or multi-line edit control that can display and edit a field in a dataset or can works as non data-aware edit control. TDBDateTimeEditEh component represents a single-line date or time edit control that can display and edit a datetime field in a dataset or can works as non data-aware edit control. TDBComboBoxEh component represents a single or multi-line edit control that combines an edit box with a scrollable list and can display and edit a field in a dataset or can works as non data-aware combo edit control. TDBNumberEditEh component represents a single-line number edit control that can display and edit a numeric field in a dataset or can works as non data-aware edit control. TPropStorageEh, TIniPropStorageManEh, TRegPropStorageManEh components Components realize technology to store component properties to/from settings storage such as ini files, registry etc. TMemTableEh component dataset, which hold data in memory. Its possible consider as an array of records. Besides, it: Supports a special interface, which allows DBGridEh component to view all data without moving active record. Allows fetch data from TDataDriverEh object (DataDriver property). Allows unload change back in DataDriver, operative or postponed (in dependencies of the CachedUpdates property). Allows to create a master/detail relations on the client (filtering record) or on the external source (updating parameters [Params] and requiring data from DataDriver). Allows once-only (without the dynamic support) sort data, including Calculated and Lookup field. Allows create and fill data in design-time and save data in dfm file of the Form. Allows keep record in the manner of trees. Each record can have record elements-branches and itself be an element to other parental record. Component TDBGridEh supports to show the tree-type structure of these records. Allows to connect to the internal array of other TMemTableEh (via ExternalMemData property) and work with its data: sort, filter, edit. Has interface for requesting list of all unique values in one column of records array, ignoring local filter of the DataSet. TDBGridEh uses this property for automatic filling a list in DropDownBox of the subtitle filter cell. TDataDriverEh component carry out two tasks: Delivers data to TMemTableEh. Processes changed records of TMemTableEh (writes them in other dataset, or call events for processing the changes in program). TSQLDataDriverEh DataDriver that have four objects of the TSQLCommandEh type: SelectCommand, DeleteCommand, InsertCommand, UpdateCommand, GetrecCommand. TSQLDataDriverEh can not transfer queries to the server but it call global (for application) event which it is necessary to write to execute SQL expressions on the server. TBDEDataDriverEh, TIBXDataDriverEh, TDBXDataDriverEh and TADODataDriverEh Components. These are SQLDataDrivers that can deliver queries to the server using corresponding drivers of the access to datas. -------------------- 2. Installation Library -------------------- -------------------- 2.1 Installing library automatically -------------------- Run EhLibInstaller.exe program from "Installer" folder to install EhLib in Delphi/C++ Builder IDE. The program creates folders to keep EhLib binary and other requared files, copies requared files to created folders, compiles packages, register packages in IDE and write requared paths in registry. If you have executable installation program (for example, EhLibSetupD7Eval.exe) then you only need to run program and follow installation process. Setup automatically writes all units in necessary directory, installs packages and help files in IDE. -------------------- 2.2 Installing library manually ------------------- Follow next instructions to install files from EhLib archive: -- 2.2.1. For RAD Studio XE2 (Delphi) or higher: --------------------------------------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including EhLib.bpl, EhLib.dcp or EhLibXX.bpl, EhLibXX.dcp, EhLibDataDriversXX, DclEhLibDataDriversXX files). These files can be located in the following folders on your computer C:\Users\All Users\Documents\RAD Studio\1X.0 C:\Users\All Users\Documents\Embarcadero\Studio\XX.0\Bpl C:\Users\All Users\Documents\Embarcadero\Studio\XX.0\Dcp Create new folder where source code and binary files will be kept (For example, C:\RAD_Studio_XE2\Components\EhLib). Hereinafter this folder will be call as "EhLib folder". Create new subfolder "Lib" in the "EhLib folder". Copy files from folders "Common", "RADStudioXE2" and "LangResources\Res" of EhLib archive into the folder "[EhLib folder]\Lib" as that all files were in one folder - "Lib". Default language resource of the library is English. If you want to change it to the other language do the next steps: - Select one of language file EhLibLangConsts.XXX.dfm - Copy this file to EhLibLangConsts.dfm file (with replacment of existing file) - In the first line of a new EhLibLangConsts.dfm file delete _XXX suffix in the name of object like this: object TEhLibLanguageConsts_ENU -> object TEhLibLanguageConsts Run RAD Studio IDE and Open EhLibProjGroup160.groupproj file from [EhLib folder]\Lib. Compile all packages of Prject Group. Install DclEhLibXX.Dpk and DclEhLibDataDriversXX.Dpk packages in IDE (Use Project/Install menu). Consistently compile packages EhLibXX.Dpk and EhLibDataDriversXX.Dpk in next modes: Win32\Debug Win64\Release Win64\Debug After compilation there should be created subfolders a Win32\Release, Win32\Debug, Win64\Release, Win64\Debug in the "[EhLib folder]\Lib" folder. Copy the *. dfm and *. res files from the "[Folder EhLib]\Lib" folder into the each of the next folders: Win32\Release, Win32\Debug, Win64\Release, Win64\Debug In the RAD Studio IDE add next paths: "[EhLib folder]\Lib\Win32\Release" path in the "Library path" for the Win32 platform. "[EhLib folder]\Lib\Win32\Debug" path in the "Debug dcu" for the Win32 platform. "[EhLib folder]\Lib\" path in the "Brasing path" for the Win32 platform. "[EhLib folder]\Lib\Win64\Release" path in the "Library path" for the Win64 platform. "[EhLib folder]\Lib\Win64\Debug" path in the "Debug dcu" for the Win64 platform. "[EhLib folder]\Lib\" path in the "Brasing path" for the Win64 platform. -- Copy DEMOS folder from the Archive EhLib to the "[EhLib Folder]". Open and compile any demo project for test. 2.2.2. Delphi 5.x - 7.x, Delphi 9.X Win32, BDS2006 Win32, Delphi2007, CodeGear RAD Studio 2009: ------------------------------------------------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including EhLib.bpl, EhLib.dcp or EhLibXX.bpl, EhLibXX.dcp, EhLibDataDriversXX, DclEhLibDataDriversXX files). Create directory from which you will install EhLib library ('EhLib directory') (for example, C:\Delphi[X]\EhLib). Copy files from "Common", "Delphi[X]" | "BDS2006" and "LangResources\Res.Ansi" folders of the EhLib archive to 'EhLib directory'. Default language resource of the library is English. If you want to change it to the other language do the next steps: - Select one of language file EhLibLangConsts.XXX.dfm - Copy this file to EhLibLangConsts.dfm file (with replacment of existing file) - In the first line of a new EhLibLangConsts.dfm file delete _XXX suffix in the name of object like this: object TEhLibLanguageConsts_ENU -> object TEhLibLanguageConsts By default Delphi (5, 6 and 7) places compiled files to the <Delphi path>\Projects\Bpl directory and this directory already present in the search PATH. But if you overwrite default BPL directory then you need put compiled EhLibXX.BPL file into directory that is accessible through the search PATH (i.e. DOS "PATH" environment variable; for example, in the Windows\System directory). Add, (if needed) 'EhLib directory' in Tools->Environment Options->Library-> Library Path (For Delphi 9 in Tools->Options->Environment Options-> Delphi Options->Library - Win32->Library Path). Use "File\Open..." menu item of Delphi IDE to open the runtime package - EhLibXX.Dpk. In "Package..." window click "Compile" button to compile the package. After that open and compile EhLibDataDriversXX.Dpk. After compiling run-time packages install design-time packages DclEhLibXX.BPL and DclEhLibDataDriversXX.BPL into the IDE. For that use "File\Open..." menu item to open design-time package DclEhLibXX.Dpk. In "Package..." window click "Compile" button to compile the package and then click "Install" button to register EhLib components on the component palette. Open and install DclEhLibDataDriversXX.Dpk package. EhLib components have to appear on 'EhLib' page of components palette. 2.2.4. Delphi 9.X Vcl.Net, , BDS2006 Vcl.Net: ---------------------------------------- Uninstall previous or evaluation version of EhLib (Old version) from Delphi IDE. Remove or copy to other directory files of old version to prevent crossing old and new version of EhLib (Including Vcl.EhLib90.dll, Vcl.DclEhLib90.dll, Vcl.EhLibDataDrivers90.dll, Vcl.DclEhLibDataDrivers90.dll files). Create directory from which you will install EhLib library ('EhLib directory') (for example, C:\BDS\3.0\EhLibVclNet). Copy files from Common and Delphi9 directories of the EhLib archive to 'EhLib directory'. In Delphi IDE: Add, (if needed) 'EhLib directory' in Component->Installed .NET Components ...-> Assembly Search Paths. Add, (if needed) 'EhLib directory' in Tools->Options->Environment Options-> Delphi Options->Library - NET->Library Path. Use "File\Open..." menu item of Delphi IDE to open the runtime package - Vcl.EhLibXX.Dpk. In "Project Manager..." window, click right button above 'Vcl.EhLibXX.Dll' and select "Build" menu to compile package. After that, open and compile Vcl.EhLibDataDriversXX.Dpk, Vcl.DclEhLibXX.Dpk and Vcl.DclEhLibDataDriversXX.Dpk. Open menu "Component->Installed .NET Components ..."->.NET VCL Components. Press 'Add...' button. Locate 'Vcl.DclEhLibXX.dll' and press 'Open'. (By default, this file have to be located in 'EhLib directory' directory) Press 'Ok' in 'Installed .NET Components' Dialog. 4. Documentation and Help ------------------------- 4.1. This version of library doesn't have embedded help files for Delphi8 or Higher. But the online help is available on the ehlib home page - http://www.ehlib.com/online-help 4.2. Delphi 7.x: Copy the EhLib.hlp and EhLib.cnt files to the Delphi HELP subdirectory. Select Help|Customize to start the OpenHelp application. Add the EhLib.cnt file to the Contents page, add the EhLib.hlp file to the Index and Link pages. 5. Demonstration Programs and Projects -------------------------------------- Demonstration programs use tables from the DEMOS directory and ADO Data Access. Read description of Demo projects in the file Demos\Info Eng.doc 6. Registering and Prices ------------------------- The EhLib is a Commercial product. If you find it useful and want to receive the latest versions please register your evaluation copy. You can read detailed information about prices on ehlib home prices page http://www.ehlib.com/buy You can read detailed information about registration at https://secure.shareit.com/shareit/product.html?productid=102489 After registration you will receive (e-mail only) address of registered version for downloading and password for unpacking. By registering the components you get the following advantages: 1. You will get new versions of the library free within a year from the date of registration. 2. You will get technical support for the library all the time. 3. You encourage EhLib Team to make the library even better. 7. Other information ----------------- (1) Information for user who already have old version of TDBGridEH or TDBSumList or EhLib installed: Before installation this version of EhLib uninstall previous version of TDBGridEh or TDBSumList or EhLib from IDE and remove or copy this files to other directory to prevent crossing of new and old files. (2) If at compile-time under C++ Builder you get next error: [Linker Error] Unresolved external 'AlphaBlend' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\LIB\EHLIBB60.LIB|C:\VCL6\EhLib\Common\DBGridEh.pas then add msimg32.lib library in Linker options of your Project. It is placed at $(BCB)\lib\psdk\msimg32.lib 8. About Company ---------------- Contact as if you have any questions, comments or suggestions: EhLib Team
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值