Original author: Hans Gulö <hewg@gmx.net>
Version 1.0
TTBXDBNavItem is a direct descendant of TTBXCustomItem. It features DB Navigator functionalities through its DbAction and DataSource properties.
This component requires TBX Package version 2.0 or higher, and Toolbar2000 version 2.1.2 or higher. Earlier versions are untested.
Here I am assuming you are already familiar to install component package to Delphi IDE.
Unzip the archive preserving the path to existing TBX directory.
You will find tbxdbn_dx.dpk
and tbxdbndsgn_dx.dpk in $(TBX)\Packages directory.
These are run-time and design-time packages source respectively for specific
Delphi version. Build the run-time package first, and then build/install the
designtime package.
Actually I have only tested Delphi 5 and Delphi 7 Packages. Other packages are untested but I'm sure it won't be hard to fix should any error occurs.
There are no package for BCB as I'm not quite familiar with it. BCB users should create their own. I guess that should be easy too.
There are no image glyphs provided in this archive. You should provide your own.
In TBXDBNavItem unit:
Type | DataSet Method |
---|---|
daFirst | DataSet.First |
daPrior | DataSet.Prior |
daNext | DataSet.Next |
daLast | DataSet.Last |
daInsert | DataSet.Insert |
daDelete | DataSet.Delete |
daEdit | DataSet.Edit |
daPost | DataSet.Post |
daCancel | DataSet.Cancel |
daRefresh | DataSet.Refresh |
In TBXDBNavItem unit:
These are respectively the message-text and message-caption of Windows DialogBox popped by TTBXDBNavItem object (having DbAction property value daDelete) confirming the user about record deletion. You can override them with localized message texts.
In TBXDBNavItem unit:
Currently each TTBXDBNavItem object has its own TDataLink object to communicate with its DataSource. For example, when we create 4 TBXDBNavItem objects for a DataSource, there will be 4 DataLinks instantiated.
Actually we can create a non visual class, lets call it TTBXDbNavItemData to manage the 'relationship' between DataSource and TBXDBNavItem instances. The DataSource will be a property of this class. All TTBXDbNavItem objects will be linked to the DataSource through this class.
This way, a set of items accessing the same DataSource will require only one DataLink, like standard Delphi TDBNavigator does for all its buttons.
This code/software is freeware and is provided as is. Use at your own risk. I take no responsibilities for any damages arising from the use of this software. Distribution of the modified version of the source code must clearly state that I am the original author.
Toolbar2000 and TBX Package retain their own copyrights and terms of licenses.
.EOD