Unit DBListView98

////////////////////////////////////////////////////////////////////////////// DBLISTVIEW98 // ////////////////////////////////////////////////////////////////////////////// Virtual DB List view for D3 // * Icon, report, list, Hottracking, Column sorting, Column Hottracking, // Column dragging, SubItem bitmaps, new CustomDraw implementation, // Registry saving, ... and more // ////////////////////////////////////////////////////////////////////////////// Version 1.85 Beta // Date de création : 17/06/1997 // Date dernière modification : 24/11/1997 // ////////////////////////////////////////////////////////////////////////////// Jean-Luc Mattei // jlucm@club-internet.fr // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// IMPORTANT NOTICE : // // // This program is FreeWare // // Please do not release modified versions of this source code. // If you've made any changes that you think should have been there, // feel free to submit them to me at jlucm@club-internet.fr // ////////////////////////////////////////////////////////////////////////////// NOTES : // // * Large Tables are Now Allowed without memory overload // * With large fonts icon view is not very "pretty" // * Icon spacing will be added in next versions // * CheckBoxes will be implemented in the (near) future // ////////////////////////////////////////////////////////////////////////////// REVISIONS : // // 0.60 : // * UpdateRowCount when ListView Resized // * Changed KeyDown // * VisibleRowCount removed (VisibleCount) // * No Column Click if no index // * Added .DCR // * Added property editors for fields and indexes // 0.70 : // * Removed a silly +TopItem // * Added Fieldtype validation // * Field verification to prevent errors on "mapping" // * Item insertion (Insert Key) with notification "OnNewItem" // * Added GetColor (utilcolr.pas) color index compatible with // Borland's TColorGrid // 0.80 : // * Added BeginUpdate / EndUpdate when ViewStyle changing // * Item n° verification in GetRecordNumber // * ActiveRecord follows ActiveSelection // 0.90 : // * items Count verfification for empty tables error // * All error messages are constants now // Two langages supported french (define FRANCAIS) & english // (define ENGLISH) (not very hard to add more and to // correct my english) // thanks to Glen Verran he reminds me that french isn't universal:)// 1.00 : // * Added CanDelete & CanInsert properties // 1.10 : // * OnAskForColor, OnAskForIcon events added (thanks to Marc A. Hale)// 1.20 : // * Bug introduced with OnAskForColor fixed (Selection bug) // * Updates locked when Adding or removing fields from a table // (Access Violation) // 1.30 : * DefaultIcon Property Added for Each columns // 1.40 : * If RegistryKey empty it uses Constantes Keys for Dynamic Registry// 1.50 : * Use of indexs modified for Master/Detail tables // * DefaultSort is not reverse // * SetSort can be used to control sort order and IindexFieldname // 1.60 : * Some Dataset Moving bugs corrected (whith HideSelection disabled)// * No more error message when HideSelection is set to false with // a closed datasource // 1.70 : * .Text is used instead of .AsString // * Column alignment works now (not on the 1st column) // (thanks to Sibina) // 1.80 : * New properties // - RecordNumber : allows to get & set Record number // - Buffered : allow entire buffering of (small) table for speed // or no buffering of (large) table for memory saving // * Item drawing have been modified for speed (last drawn record is // buffered) // 1.81 : * New properties // - FlatScrollBar : FlatScrollBars Style // - BkGndImage : Background Image (doesn't work :-(( ) // - ItemHint : Hint for each items (or not) // * ItemColor bug corrected // * CustomDraw proc Changed // * Buffered & Non Buffered Speed optimzations // 1.82 : * FlatScrollBar property is published now :-) // * GPF bug when Adding column have been corrected // * Goto Item 0 when DataChanged // 1.83 : * Linked Table can be activated and deactivated without exception // * Coponent Context Menu allows to add all fields at a time // (First Context Menu Item doesn't work in this version) // 1.84 : * Buffer Error when deleting all records and adding a new one // * Doesn't allow edititng of calculated fields // 1.85 : * PARADOX Compiler directive for large faster Paradox tables // Uses RecNo instead of MoveBy (works also with DBASE) // ////////////////////////////////////////////////////////////////////////////// {$DEFINE FRANCAIS} {$DEFINE ENGLISH} {$DEFINE PARADOX

Classes

TCustomDBListView -
TDBIconOptions - TDBIconOptions
TDBListView - TDBListView
TListDBColumn -
TListDBColumns -
TListViewDataLink -

Functions

Register -

Types

TDBColumnValue
TDBColumnValues
TDBLVAskForColor
TDBLVAskForIcon
TDBLVChangeEvent
TDBLVChangingEvent
TDBLVColumnClickEvent
TDBLVCompareEvent
TDBLVDeletedEvent
TDBLVEditedEvent
TDBLVEditingEvent
TDBLVFindItemEvent
TDBLVNewItemEvent

Constants

Variables


Functions


procedure Register;


Types


TDBColumnValue = (cvColor, cvWidth, cvFont, cvAlignment, cvReadOnly, cvTitleColor,
    cvTitleCaption, cvTitleAlignment, cvTitleFont, cvImeMode, cvImeName);

TDBColumnValues = set of TDBColumnValue

TDBLVAskForColor = function(Sender: TObject; Column: TListDBColumn): TColor of object

TDBLVAskForIcon  = function(Sender: TObject; Column: TListDBColumn): Integer of object

TDBLVChangeEvent = procedure(Sender: TObject; Item: Integer;
    Change: TItemChange) of object

TDBLVChangingEvent = procedure(Sender: TObject; Item: Integer;
    Change: TItemChange; var AllowChange: Boolean) of object

TDBLVColumnClickEvent = procedure(Sender: TObject; Column: TListDBColumn) of object
TCustomDBListView
TDBLVCompareEvent = procedure(Sender: TObject; Item1, Item2: Integer;
    Data: Integer; var Compare: Integer) of object

TDBLVDeletedEvent = procedure(Sender: TObject; Item: Integer) of object

TDBLVEditedEvent = procedure(Sender: TObject; Item: Integer; var S: string) of object

TDBLVEditingEvent = procedure(Sender: TObject; Item: Integer;
    var AllowEdit: Boolean) of object

TDBLVFindItemEvent = function(Sender: TObject; StartIndex: Integer; StrSearch: string; vkDirection, Flags : UINT) : Integer of Object

TDBLVNewItemEvent = procedure(Sender: TObject; DataSet: TDataSet)

Constants


Variables