10
我需要填寫(黑色)下面圖片中突出顯示的小白方塊。如何填寫TVirtualStringTree中滾動條上方的區域?
我試過添加額外的列。我試圖擴展PaintInfo.PaintRectangle。我已經嘗試了我能想到的金額欄上的每個設置。我沒有想法。
任何人有任何想法如何做到這一點?
下面是自定義頁眉繪圖的代碼。 (原諒with
聲明,不是我的原代碼....)
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;
這看起來並不像普通的香草主題 –
你是怎麼做到的頭部有一個不同的顏色? VCL主題?定製油漆?還有別的嗎? –
添加了顯示自定義標題如何繪製的代碼。 –