当我有这样的:如何在VCL风格的页面控制所有者绘制
if not _nightMode then
TStyleManager.TrySetStyle('Windows', False);
我可以对页面控制所有者绘制:
procedure TMyMainForm.pcDetailedDrawTab(Control: TCustomTabControl; TabIndex: Integer;
const Rect: TRect; Active: Boolean);
var
can: TCanvas;
cx, by: Integer;
aclr: TColor;
begin
if pcDetailed.Pages[TabIndex] = tsActualData then begin
can := pcDetailed.Canvas;
cx := Rect.Left + Rect.Width div 2;
by := Rect.Bottom - 2;
if _nightMode then aclr := clWhite else aclr := clBlack;
can.Pen.Color := aclr;
can.Brush.Color := aclr;
can.Polygon([Point(cx - 10, by - 10), Point(cx + 10, by - 10), Point(cx, by)]);
end;
end;
当我有这样的:
if _nightMode then
TStyleManager.TrySetStyle('Cobalt XEMedia', False);
我画的三角形迷路了。
如何绘制任何VCL风格的三角形?
Delphi 10西雅图。
这是VCL的风格,而不是主题。 Delphi的版本通常对这些问题很重要。 –