Guest User

Untitled

a guest
Jul 18th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. procedure TfrmMain.MyVSTHeaderDrawQueryElements(Sender: TVTHeader;
  2. var PaintInfo: THeaderPaintInfo; var Elements: THeaderPaintElements);
  3. begin
  4. Elements := [hpeBackground];
  5. end;
  6.  
  7. procedure TfrmMain.MyVSTAdvancedHeaderDraw(Sender: TVTHeader;
  8. var PaintInfo: THeaderPaintInfo; const Elements: THeaderPaintElements);
  9. begin
  10. if hpeBackground in Elements then
  11. begin
  12. PaintInfo.TargetCanvas.Brush.Color := clFuchsia; // <-- your color here
  13. if Assigned(PaintInfo.Column) then
  14. DrawFrameControl(PaintInfo.TargetCanvas.Handle, PaintInfo.PaintRectangle, DFC_BUTTON, DFCS_FLAT or DFCS_ADJUSTRECT); // <-- I think, that this keeps the style of the header background, but I'm not sure about that
  15. PaintInfo.TargetCanvas.FillRect(PaintInfo.PaintRectangle);
  16. end;
  17. end;
  18.  
  19. procedure TfrmDepositDefrayalSingly.vstItemsManuallyHeaderDrawQueryElements(Sender: TVTHeader;
  20. var PaintInfo: THeaderPaintInfo; var Elements: THeaderPaintElements);
  21. begin
  22. Elements := [hpeBackground];
  23. end;
  24.  
  25.  
  26. procedure TfrmDepositDefrayalSingly.vstItemsManuallyAdvancedHeaderDraw(Sender: TVTHeader;
  27. var PaintInfo: THeaderPaintInfo; const Elements: THeaderPaintElements);
  28. begin
  29. if hpeBackground in Elements then
  30. begin
  31. PaintInfo.TargetCanvas.Brush.Color := cGlobalVar.BasicColor;
  32. PaintInfo.TargetCanvas.FillRect(PaintInfo.PaintRectangle);
  33.  
  34. if Assigned(PaintInfo.Column) then
  35. begin
  36. PaintInfo.TargetCanvas.Brush.Color := clGray;
  37. PaintInfo.TargetCanvas.FrameRect(PaintInfo.PaintRectangle);
  38. end;
  39. end;
  40. end;
Add Comment
Please, Sign In to add comment