Subject RE: [IBO] [TIB_Grid] OnDrawCell restriction for fixed cell
Author Jason Wharton
There are other events like OnDrawTitle and OnDrawBorder that allow some
control over this that should be sufficient for most people's needs.

But, I went ahead and put a general paint override event called
OnDrawFixedCell in case there is something you are unable to do otherwise.

Jason Wharton


> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Andreas Pohl
> Sent: Tuesday, May 09, 2006 7:19 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] [TIB_Grid] OnDrawCell restriction for fixed cell
>
>
> 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