EhLib 5 Developers guide 官方开发手册Word文档下载推荐.docx
《EhLib 5 Developers guide 官方开发手册Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《EhLib 5 Developers guide 官方开发手册Word文档下载推荐.docx(77页珍藏版)》请在冰点文库上搜索。
TDBGridEhcomponent
UsingTDBGridEh
ItprovidesallfunctionalityofTDBGridandaddsseveralnewfeaturesasfollows:
-Allowstoselectrecords,columnsandrectangleareas.
-Providesspecialtitlesthatcancoverseveralorallcolumns.
-Canhaveafooterthatisabletoshowsum/count/otherfieldvalues.
-Allowstoresizecolumnautomaticallytofitgridwidthequaltoclientwidth.
-Hasanabilitytochangerowheightandtitleheight.
-Allowsautomaticbrokenofasinglelinelongtitleanddatarowstoamultiline.
-Allowstitletoactasbuttonand,optionallyshowasortmarker.
-AllowstomarktitlesbysortmarkingsingsautomaticallyandsortdatainDataSet.
-Allowstotruncatelongtextwithellipsisincells.
-Allowslookuplisttoshowseveralfields.
-Haveanabilitytomakeanincrementalsearchinlookupfields.
-Canhavefrozennonscrollablecolumns.
-AllowstoshowDateTimepickerforTDateFieldandTDateTimeField.
-AllowstoshowbitmapsfromTImageListdependingonfieldvalue.
-Allowstohideandtrackhorizontalorverticalscrollbars.
-Allowstohidecolumns.
-Allowstoshow3Dframeforfrozen,footeranddatarows.
-Allowstodrawmemofields.
-Canshowmultilineinplaceeditor.
-CanhaveaproportionalscrollingforDadaSetsindependentlyofdataset’ssequencing.
-AllowstoshowcheckboxesautomaticallyforBooleanfields.Allowstoshowcheckboxesforothertypeoffields.
-Hasprocedurestosaveandrestorelayout(visiblecolumns,columnsorder,columnswidth,sortmarkers,rowheight)in/fromregistryorinifile.
-Allowstoshowhint(ToolTips)fortextthatdon'
tfitinthecell.
-AllowstoexportdatatoText,Csv,HTML,RTF,XLSandinternalformats.
-AllowstoimportdatafromTextandinternalformats.
-Cansortdatainvariousdatasets.
-Canfilterdatainvariousdatasets.
TDBLookupComboboxEhcomponent
Usingeditcontrols
ItprovidesallfunctionalityofTDBLookupComboboxandaddsseveralnewfeaturesasfollows:
-Canhaveflatstyle.
-AllowstoassignvaluesastoKeyValuepropertyandastodisplayTextproperty.
-AllowstoholdKeyValueandTextthatwillnotaffecttoeachothersvalues.
Dropdownlistcan:
-Showtitles,
-Havesizinggrip,
-AutomaticallysetwidthassumofDisplayWidthofthelistfields(Width=-1),
-Automaticallydropswhentheuserpressedthekey.
-Canhavespecifiedwidth.
Editbuttoncan:
-ShowDropDownandEllipsisorBitmapimage.
Haveadditionalevents:
OnKeyValueChangedandOnButtonClick.
TDBSumListcomponent
UsingTDBSumList
ItisintendedforcalculatingsumsandamountofrecordsinaTDataSetwithdynamicchanges.ComponentkeepsalistofTDBSumobjects,whichcontainstypesofgroupoperations(goSumorgoCount)andnameoffieldswhichvaluesneedsomecalculation.(goCountnameoffieldisunnecessary).
TPrintDBGridEhcomponent
UsingTPrintDBGridEh
TPrintDBGridEhprovidespropertiesandroutinesforpreviewandprintofTDBGridEhcomponentwithseveralfeatures:
-Abilitytoexpandrowsverticallyuntilalltextisprinted.
-Abilitytoscalegridtofitittothepagewidth.
-Abilitytoprint/previewtitleforgrid.
-Abilitytoprint/previewpageheaderandpagefooterwhereyoucanspecifymacrosforcurrentpage,currentdate,currenttimeand/orstatictext.
-Automaticallyprint/previewmulti-selectedareaofTDBGridEhifit’sareaisnotempty.
-Abilitytoprint/previewrichtextbeforeandaftergrid.
TPreviewBoxcomponent
TPreviewBoxletsyoutocreateacustomizableruntimepreview.
TPrinterPreviewobject
TPrinterPreviewletsyoutorecordprintabledatainbufferforfollowingoutputthemonscreenandtoprinter.TPrinterPreviewhaveallfunctionsandpropertiesasinTPrinterobject.YoucanuseTPrinterPreviewobjectsimilarlytoTPrinterexceptsomedetails.InTPrinterPrinter.Canvas.HandleandPrinter.HandleisthesamebutinTPrinterPreviewPrinterPreview.Canvas.HandlerepresentsthemetafileinthatisrecoredthedataandPrinterPreview.HandlerepresentsPrinter.Handle.ItmeansthatyouhavetousePrinterPreview.Canvas.Handlefordrawingoperation(likeDrawText,DrawTexteEx,e.t.c.)andusePrinterPreview.Handleforsuchfunctionsasreturninginformationaboutprinterfacilities(GetDeviceCaps,e.t.c.).GlobalfunctionPrinterPreviewreturnsdefaultPrinterPreviewobjectandshowsdatainthedefaultpreviewform.
TDBEditEhcomponent
representsasingleormulti-lineeditcontrolthatcandisplayandeditdataoffieldinadatasetorcanworkasnondata-awareeditcontrol.
TDBDateTimeEditEhcomponent
representsasingle-linedateortimeeditcontrolthatcandisplayandeditdataofTDateTimefieldsindatasetorcanworkasanondata-awareeditcontrol.
TDBComboBoxEhcomponent
representsasingleormulti-lineeditcontrolthatcombinesaneditboxwithascrollablelistandcandisplayandeditafieldinadatasetorcanworksasnondata-awarecomboeditcontrol.
TDBNumberEditEhcomponent
representsasingle-linenumbereditcontrolthatcandisplayandeditanumericfieldinadatasetorcanworkasnondata-awareeditcontrol.
TPropStorageEh,TIniPropStorageManEh,TRegPropStorageManEhcomponentsUsingTPropStorageEh
Thesecomponentsrealizeatechnologyofstoringcomponentpropertiesto/fromsuchstoragesasINIfiles,Registryetc.
TMemTableEhcomponent
ItisadatasetthatholdsalldatainmemoryandcangetdatafromTDataDriverEhandreturnchangedrecordsbacktotheTDataDriverEh.
TDataDriverEhcomponent
DeliverrecordsfromtheservertotheTMemTableEh.
DeliverchangedrecordsfromTMemTableEhbacktotheserver.
TDataSetDriverEhcomponent
ItisaDataDriverthatdeliverrecordsinTMemTableEhfromotherDataSetanddeliverchangedrecordsfromTMemTableEhbacktotheDataSet.
TSQLDataDriverEhcomponent
ItisaDataDriverthathavepropertiesforkeepingfiveSQLexpressionsandparametersforqueryingdata,removing,insertions,updatingandrefreshingrecords.TSQLDataDriverEhbyitselfcan’trequestdatafromserver,butitcanprepareparametersoftherequestandhaveaglobaleventthatprogrammercanwritefortransferringSQLexpressionto/fromtheserver.
TBDEDataDriverEhcomponent
ItisaDataDriverthatinteractswiththeDBserverusingBDEconnection.
TIBXDataDriverEhcomponent
ItisaDataDriverthatinteractswiththeDBserverusingIBXconnection.
TDBXDataDriverEhcomponent
ItisaDataDriverthatinteractswiththeDBserverusingDBXconnection.
TADODataDriverEhcomponent
ItisaDataDriverthatinteractswiththeDBserverusingADOconnection.
Installation
BelowitwillbedescribedhowtoinstallEhLibunderDelphi6.
UninstallpreviousorevaluationversionofEhLibfromDelphi6IDE.
RemoveorcopythisfilestootherdirectorythisfilestopreventcrossingthisandnewversionofEhLib(IncludingEhLib.bpl,EhLib.dcp,EhLibXX.bpl,EhLibXX.dcpfiles).
Unpackingarchive
UnpackEhLibarchive.
Afterunpackingyouwillhavenextlistofdirectories:
Directoriesof'
EhLib-sourceinclude'
version:
BCB5
ContainsourcefileswhicharespecificforC++Builder5.
BCB6
ContainsourcefileswhicharespecificforC++Builder6.
Common
ContainsourcefileswhicharecommonforallversionsofDelphiandC++Builder.
Delphi5
ContainsourcefileswhicharespecificforDelphi5.
Delphi6
ContainsourcefileswhicharespecificforDelphi6.
Delphi7
ContainsourcefileswhicharespecificforDelphi7.
DEMOS
Demonstrationprojects.ItusetablesfromtheDEMOSdirectoryandBDEalias"
DBDEMOS"
.
LangResources
Containresourcefilesforvariouslanguages.
DataService
Containfilesthatcontainobjectsthatallowstosortdatainvarioustypesofdatasets.
ORDERS
Containtextfilesinwhichdescribedhowtoregister
variousversionsofEhLib.
HLP
Containhelpfiles.
Ehlib-withoutsource'
versionor'
Ehlib-Evaluationversion'
:
ContainallbinaryfileswhichareneedforC++Builder5.
ContainallbinaryfileswhichareneedforC++Builder6.
ContaininterfacepartofsourcefilesofEhLib.(Onlyforinformation,notrequireforinstallation.)
ContainallbinaryfileswhichareneedforDelphi5.
ContainallbinaryfileswhichareneedforDelphi6.
ContainallbinaryfileswhichareneedforDelphi7.
Create,ifneed,newdirectory"
EhLib"
inyourDelphi_Xdirectory.(Forinstance:
C:
\Delphi6\EhLib).
IfyouhaveEhLib-sourceincludeversionthencopytothisdirectoryfilesfromCommonandDelphi6directoryofEhLibarchive.
IfyouhaveEhLib-withoutsourceversionorevaluationversionEhLibthencopytothisdirectoryfilesfrom