procedure cxGridCustomDrawIndicatorCell(
Sender: TcxGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
var
FValue: string;
FBounds: TRect;
begin
FBounds := AViewInfo.Bounds;
if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
begin
ACanvas.FillRect(FBounds);
ACanvas.DrawComplexFrame(FBounds, clBlack, clBlack, [bBottom, bLeft, bRight], 1);
FValue :=IntToStr(TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index+1);
InflateRect(FBounds, -1, -1); //Platform specific. May not work on Linux.
if TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index = Sender.DataController.FocusedRecordIndex then
begin
ACanvas.Font.Color := clWhite;
ACanvas.Brush.Style := bsSolid;
end
else
begin
ACanvas.Font.Color := clBlack;
ACanvas.Brush.Style := bsClear;
end;
ACanvas.DrawText(FValue, FBounds, cxAlignCenter or cxAlignTop);
ADone := True;
end;
end;