Subject | [TIB_Grid] OnDrawCell restriction for fixed cell |
---|---|
Author | Andreas Pohl |
Post date | 2006-05-09T14:19:26Z |
There was a need for custom draw in cell with state in gdFixed. Tracing
to the sources I could find that OnDrawCell event of TIB_Grid is only
called if cell's state is not in gdFixed.
So I add in IB_Grid.pas the needed call and now this event is fired for
all cells.
procedure TIB_CustomGrid.DrawCell()
around line 5816:
{$IFDEF IBO_VCL40_OR_GREATER}
// restore everthing to prevent changes in subsequent operations
if BiDiMode = bdRightToLeft then
begin
ChangeGridOrientation(True);
tmpRect := tmpRect2;
end;
{$ENDIF}
end;
// *************** Changes by A. Pohl 2006-05-09 ****************** //
if Assigned( OnDrawCell ) then
OnDrawCell( Self, ACol, ARow, ARect, AState );
end
else
with FocusedCell do
begin
if ( ACol = X ) and
( ARow = Y ) and DataLink.Prepared and not FHideRowSelection then
Maybe this could be included to further releases.
--
Andreas
to the sources I could find that OnDrawCell event of TIB_Grid is only
called if cell's state is not in gdFixed.
So I add in IB_Grid.pas the needed call and now this event is fired for
all cells.
procedure TIB_CustomGrid.DrawCell()
around line 5816:
{$IFDEF IBO_VCL40_OR_GREATER}
// restore everthing to prevent changes in subsequent operations
if BiDiMode = bdRightToLeft then
begin
ChangeGridOrientation(True);
tmpRect := tmpRect2;
end;
{$ENDIF}
end;
// *************** Changes by A. Pohl 2006-05-09 ****************** //
if Assigned( OnDrawCell ) then
OnDrawCell( Self, ACol, ARow, ARect, AState );
end
else
with FocusedCell do
begin
if ( ACol = X ) and
( ARow = Y ) and DataLink.Prepared and not FHideRowSelection then
Maybe this could be included to further releases.
--
Andreas