当我有这个时:
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 样式绘制三角形?
德尔福 10 西雅图。