上面好像没有caption的属性;我想写上"开""关"这样的字;
但是 使用 Switch1Paint
procedure TForm1.Switch1Paint(Sender: TObject; Canvas: TCanvas;
const ARect: TRectF);
begin
Canvas.Stroke.Color := claRed; Canvas.Stroke.Kind := TBrushKind.bkSolid;
Canvas.FillText(ARect,'开',true,1,,TTextAlign.taLeading, TTextAlign.taLeading);
end;没效果啊 panel 就可以的~~
但是 使用 Switch1Paint
procedure TForm1.Switch1Paint(Sender: TObject; Canvas: TCanvas;
const ARect: TRectF);
begin
Canvas.Stroke.Color := claRed; Canvas.Stroke.Kind := TBrushKind.bkSolid;
Canvas.FillText(ARect,'开',true,1,,TTextAlign.taLeading, TTextAlign.taLeading);
end;没效果啊 panel 就可以的~~
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货