I have a need to fill in (with black) the little white square that I've highlighted in the picture below.
I have tried adding extra columns. I have tried expanding the PaintInfo.PaintRectangle. I have tried every setting on the Amount column that I can think of. I am out of ideas.
Anyone have any ideas on how to do that?
Here is the code that does the custom header drawing. (Forgive the with
statement, not my original code....)
procedure TWinPOSReceiptPluginForm.ReceiptDisplayTreeAdvancedHeaderDraw(Sender: TVTHeader; var PaintInfo: THeaderPaintInfo;
const Elements: THeaderPaintElements);
var
TempText: string;
begin
with PaintInfo do
begin
// First check the column member. If it is NoColumn then it's about the header background.
if (hpeBackground in Elements) and (Column <> nil) then begin
TempText := Column.Text;
TargetCanvas.Brush.Color := $444444;
TargetCanvas.FillRect(PaintRectangle);
TargetCanvas.Font.Color := clWhite;
TargetCanvas.Font.Style := [];
TargetCanvas.TextOut (PaintRectangle.Left + 3, PaintRectangle.Top + 3, TempText);
end;
end;
end;