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;
|
||||
FKeyList: TStrings;
|
||||
FNotInKeyListIndex: integer;
|
||||
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||
function GetFooter: TRxColumnFooter;
|
||||
function GetKeyList: TStrings;
|
||||
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
||||
@ -385,6 +386,7 @@ type
|
||||
property Filter: TRxColumnFilter read FFilter write SetFilter;
|
||||
property DirectInput : boolean read FDirectInput write FDirectInput default true;
|
||||
property EditButtons:TRxColumnEditButtons read FEditButtons write SetEditButtons;
|
||||
property OnDrawColumnCell: TDrawColumnCellEvent read FOnDrawColumnCell write FOnDrawColumnCell;
|
||||
end;
|
||||
|
||||
{ TRxDbGridColumns }
|
||||
@ -2328,6 +2330,10 @@ begin
|
||||
begin
|
||||
F := GetFieldFromGridColumn(aCol);
|
||||
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
|
||||
cbsCheckBoxColumn: DrawCheckBoxBitmaps(aCol, aRect, F);
|
||||
else
|
||||
@ -2335,7 +2341,7 @@ begin
|
||||
begin
|
||||
if F.dataType <> ftBlob then
|
||||
begin
|
||||
{ if Assigned(F.LookupDataSet) and (F.LookupResultField<>'') then
|
||||
{ if Assigned(F.LookupDataSet) and (F.LookupResultField<>'') then
|
||||
S := F.LookupDataSet.FieldByName(F.LookupResultField).DisplayText
|
||||
else}
|
||||
S := F.DisplayText;
|
||||
@ -2354,6 +2360,7 @@ begin
|
||||
DrawCellText(aCol, aRow, aRect, aState, S);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.DrawCell(aCol, aRow: integer; aRect: TRect; aState: TGridDrawState);
|
||||
|
@ -26,7 +26,7 @@ Copyright (c) 1998 Master-Bank
|
||||
translate to Lazarus by alexs in 2005 - 2012
|
||||
"/>
|
||||
<License Value="LGPL"/>
|
||||
<Version Major="2" Minor="2" Release="2" Build="112"/>
|
||||
<Version Major="2" Minor="2" Release="3" Build="114"/>
|
||||
<Files Count="66">
|
||||
<Item1>
|
||||
<Filename Value="autopanel.pas"/>
|
||||
|
Reference in New Issue
Block a user