您的位置:首页 > 其它

更改Splitter控件颜色

2015-11-30 16:01 423 查看
通过自绘的方式来实现

procedure TForm1.spl1Paint(Sender: TObject);

var

DrawPic :TPicture;

begin

DrawPic := Tpicture.Create;

DrawPic.Bitmap.Width := spl1.ClientWidth;

DrawPic.Bitmap.Height := spl1.ClientHeight;

DrawPic.Bitmap.Canvas.Pen.Color := $004D4D4D;

DrawPic.Bitmap.Canvas.Brush.Color :=$004D4D4D;

DrawPic.Bitmap.Canvas.Brush.Style := bsSolid;

DrawPic.Bitmap.Canvas.Rectangle(spl1.ClientRect.Left,spl1.ClientRect.Top,spl1.ClientRect.Right,spl1.ClientRect.Bottom);

Self.spl1.Canvas.Draw(0,0,DrawPic.Graphic);

DrawPic.Free;

end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: