You've already forked lazarus-ccr
RxDBGrid - in TRxCollumn add event - OnDrawCollumnCell. Event fired on draw current cell only
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2514 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -362,6 +362,7 @@ type
|
|||||||
FImageList: TImageList;
|
FImageList: TImageList;
|
||||||
FKeyList: TStrings;
|
FKeyList: TStrings;
|
||||||
FNotInKeyListIndex: integer;
|
FNotInKeyListIndex: integer;
|
||||||
|
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||||
function GetFooter: TRxColumnFooter;
|
function GetFooter: TRxColumnFooter;
|
||||||
function GetKeyList: TStrings;
|
function GetKeyList: TStrings;
|
||||||
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
||||||
@ -385,6 +386,7 @@ type
|
|||||||
property Filter: TRxColumnFilter read FFilter write SetFilter;
|
property Filter: TRxColumnFilter read FFilter write SetFilter;
|
||||||
property DirectInput : boolean read FDirectInput write FDirectInput default true;
|
property DirectInput : boolean read FDirectInput write FDirectInput default true;
|
||||||
property EditButtons:TRxColumnEditButtons read FEditButtons write SetEditButtons;
|
property EditButtons:TRxColumnEditButtons read FEditButtons write SetEditButtons;
|
||||||
|
property OnDrawColumnCell: TDrawColumnCellEvent read FOnDrawColumnCell write FOnDrawColumnCell;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TRxDbGridColumns }
|
{ TRxDbGridColumns }
|
||||||
@ -2328,6 +2330,10 @@ begin
|
|||||||
begin
|
begin
|
||||||
F := GetFieldFromGridColumn(aCol);
|
F := GetFieldFromGridColumn(aCol);
|
||||||
C := ColumnFromGridColumn(aCol) as TRxColumn;
|
C := ColumnFromGridColumn(aCol) as TRxColumn;
|
||||||
|
if Assigned(C.FOnDrawColumnCell) then
|
||||||
|
C.OnDrawColumnCell(Self, aRect, aCol, TColumn(ColumnFromGridColumn(aCol)), aState)
|
||||||
|
else
|
||||||
|
begin
|
||||||
case ColumnEditorStyle(aCol, F) of
|
case ColumnEditorStyle(aCol, F) of
|
||||||
cbsCheckBoxColumn: DrawCheckBoxBitmaps(aCol, aRect, F);
|
cbsCheckBoxColumn: DrawCheckBoxBitmaps(aCol, aRect, F);
|
||||||
else
|
else
|
||||||
@ -2355,6 +2361,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.DrawCell(aCol, aRow: integer; aRect: TRect; aState: TGridDrawState);
|
procedure TRxDBGrid.DrawCell(aCol, aRow: integer; aRect: TRect; aState: TGridDrawState);
|
||||||
var
|
var
|
||||||
|
@ -26,7 +26,7 @@ Copyright (c) 1998 Master-Bank
|
|||||||
translate to Lazarus by alexs in 2005 - 2012
|
translate to Lazarus by alexs in 2005 - 2012
|
||||||
"/>
|
"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Major="2" Minor="2" Release="2" Build="112"/>
|
<Version Major="2" Minor="2" Release="3" Build="114"/>
|
||||||
<Files Count="66">
|
<Files Count="66">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="autopanel.pas"/>
|
<Filename Value="autopanel.pas"/>
|
||||||
|
Reference in New Issue
Block a user