Class TCustomInspGrid (unit UInspGrid) |
Inherits from
TScrollBox
constructor Create(AOwner: TComponent);
- Public declarations
function CellRect(aCol,ARow : word):TRect;
procedure DeleteRows(ARow,Num : integer);
destructor Destroy;
procedure InsertRows(ARow,Num : integer);
procedure Loaded;
Create
procedure PaintWindow(DC: HDC);
procedure WndProc(var message : TMessage);
Protected declarations
procedure DeActivateEditor( aRow : Word);
procedure DeleteColString(ACol,Num : byte);
procedure DeleteRowString(ARow,Num : integer);
procedure DrawBevel(ARect : TRect;AState : TDrawState);
Ord(fCelltype) > 0
procedure DrawCell(ACol, ARow : word; AState : TDrawState);
with fCanvas
procedure DrawCellText(ACol, ARow : word; ARect :TRect);
procedure DrawRow(ARow : word);
ARow >= fTopRow
procedure fEditBtnClick;
procedure FreeListBox;
procedure fSetLastColWidth;
function GetCells(ACol,ARow : word) : string;
function GetColWidth(index : byte):word;
function GetGridRectangle : TRect;
stores Cells content============= TCustomInspGrid =================
function GetLeftCoordinate(Acol : byte):word;
function GetObjects(ACol,ARow : word) : TObject;
procedure InitFListBox;
HandleAllocated
procedure InitItemsList;
=========================================================================out from RowCount
procedure InsertColString(ACol,Num : integer);
procedure InsertEditor(aRow : Word);
PaintWindow
procedure InsertRowString(ARow,Num : integer);
stores initial fItems.
procedure MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y:Integer);
procedure MouseMove(Shift: TShiftState; X, Y: Integer);
procedure MouseToCell(X, Y: Integer; var ACol, ARow: word);
=========================================================================
procedure MouseUp(Button:TMouseButton; Shift:TShiftState; X,Y:Integer);
new fRow
procedure SetCells(ACol,ARow : word; const AValue : string);
procedure SetCellType(aValue : TCellType);
procedure SetColCount(aValue: byte);
procedure SetColWidth(index : byte; value : word);
procedure SetDefaultColWidth(aValue: word);
procedure SetDefaultRowHeight(aValue: word);
procedure SetListBoxBounds;
=========================================================================
procedure SetObjects(ACol,ARow : word; const AValue : TObject);
procedure SetRow(AValue : word);
procedure SetRowCount(aValue: word);
procedure UpdateScrollRange;
procedure WMCommand(var M : TWMCommand);
Case of
procedure WMGetDlgCode (var Message : TMessage);
=========================================================================
procedure WMkeydown(var Message: TWMkeydown);
ClientRect
procedure WMPaint(var Message : TWMPaint);
procedure WMSize(var Msg : TWMSize);
property TabStop :
Published declarations
property Cells : String
property CellType : TCellType
property ColCount : byte
property ColWidth : word
property DefaultColWidth : word
property DefaultRowHeight : word
property Objects : TObject
property Row : Word
property RowCount : word
property VisibleRowCount : word
property Canvas : TCanvas
event OnBtnClick : TNotifyEvent
event OnCallListBox : TCallListBoxEvent
event OnSetCellType : TSetCellTypeEvent
fCanvas : TCanvas;
stores Column where drawing was started
fCellType : TCellType;
fCol : word;
fColCount : byte;
fColWidth : array[0..2] of word;
Private declarations
fDefaultColWidth : word;
maximum value 3
fDefaultRowHeight : word;
fDrLine : boolean;
fEdit : TCustomInspEdit;
fEditRow : word;
fItems : TStringList;
fListBox : TCustomInspLBox;
fOnBtnClick : TNotifyEvent;
fOnCallListbox : TCallListBoxEvent;
fOnSetCellType : TSetCellTypeEvent;
fRow : word;
fRowCount : word;
fTopRow : word;
fVGrRect : TRect;
fVisibleRowCount : word;
xCol : word;
stores position of cursor for MoseMove
xOld : word;
constructor Create(AOwner: TComponent);
Public declarations
function CellRect(aCol,ARow : word):TRect;
procedure DeleteRows(ARow,Num : integer);
destructor Destroy;
procedure InsertRows(ARow,Num : integer);
procedure Loaded;
Create
procedure PaintWindow(DC: HDC);
procedure WndProc(var message : TMessage);
Protected declarations
procedure DeActivateEditor( aRow : Word);
procedure DeleteColString(ACol,Num : byte);
procedure DeleteRowString(ARow,Num : integer);
procedure DrawBevel(ARect : TRect;AState : TDrawState);
Ord(fCelltype) > 0
procedure DrawCell(ACol, ARow : word; AState : TDrawState);
with fCanvas
procedure DrawCellText(ACol, ARow : word; ARect :TRect);
procedure DrawRow(ARow : word);
ARow >= fTopRow
procedure fEditBtnClick;
procedure FreeListBox;
procedure fSetLastColWidth;
function GetCells(ACol,ARow : word) : string;
function GetColWidth(index : byte):word;
function GetGridRectangle : TRect;
stores Cells content
============= TCustomInspGrid =================
function GetLeftCoordinate(Acol : byte):word;
function GetObjects(ACol,ARow : word) : TObject;
procedure InitFListBox;
HandleAllocated
procedure InitItemsList;
=========================================================================
out from RowCount
procedure InsertColString(ACol,Num : integer);
procedure InsertEditor(aRow : Word);
PaintWindow
procedure InsertRowString(ARow,Num : integer);
stores initial fItems.Count
procedure MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y:Integer);
procedure MouseMove(Shift: TShiftState; X, Y: Integer);
procedure MouseToCell(X, Y: Integer; var ACol, ARow: word);
=========================================================================
procedure MouseUp(Button:TMouseButton; Shift:TShiftState; X,Y:Integer);
new fRow
procedure SetCells(ACol,ARow : word; const AValue : string);
procedure SetCellType(aValue : TCellType);
procedure SetColCount(aValue: byte);
procedure SetColWidth(index : byte; value : word);
procedure SetDefaultColWidth(aValue: word);
procedure SetDefaultRowHeight(aValue: word);
procedure SetListBoxBounds;
=========================================================================
procedure SetObjects(ACol,ARow : word; const AValue : TObject);
procedure SetRow(AValue : word);
procedure SetRowCount(aValue: word);
procedure UpdateScrollRange;
procedure WMCommand(var M : TWMCommand);
Case of
procedure WMGetDlgCode (var Message : TMessage);
=========================================================================
procedure WMkeydown(var Message: TWMkeydown);
ClientRect
procedure WMPaint(var Message : TWMPaint);
procedure WMSize(var Msg : TWMSize);
property TabStop :
Published declarations
property Cells : String
property CellType : TCellType
property ColCount : byte
property ColWidth : word
property DefaultColWidth : word
property DefaultRowHeight : word
property Objects : TObject
property Row : Word
property RowCount : word
property VisibleRowCount : word
property Canvas : TCanvas
event OnBtnClick : TNotifyEvent
event OnCallListBox : TCallListBoxEvent
event OnSetCellType : TSetCellTypeEvent
fCanvas : TCanvas;
stores Column where drawing was started
fCellType : TCellType;
fCol : word;
fColCount : byte;
fColWidth : array[0..2] of word;
Private declarations
fDefaultColWidth : word;
maximum value 3
fDefaultRowHeight : word;
fDrLine : boolean;
fEdit : TCustomInspEdit;
fEditRow : word;
fItems : TStringList;
fListBox : TCustomInspLBox;
fOnBtnClick : TNotifyEvent;
fOnCallListbox : TCallListBoxEvent;
fOnSetCellType : TSetCellTypeEvent;
fRow : word;
fRowCount : word;
fTopRow : word;
fVGrRect : TRect;
fVisibleRowCount : word;
xCol : word;
stores position of cursor for MoseMove
xOld : word;