更改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;
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;
相关文章推荐
- Web API Test Client 1.2.0
- 正则表达式入门
- OC 字符串操作
- Time33算法
- C++primer plus第六版课后编程练习答案10.5
- Cookie的使用讲解及示例
- 前后台校验示例及讲解
- Hibernate Validation使用示例及讲解
- Jquery Validation实用示例及讲解
- SpringMVC下打包文件的下载
- Chrome下最简分页打印方案
- 基于JDK API实现文件的压缩与解压
- 使用Spring发送基于freemarker模板的邮件
- SpringMVC下Excel文件的上传下载实现
- 地址重写
- Git解惑
- Binder的实现
- 技术经理角色的几点思考
- 深入理解控件(ViewRoot)系统(节选)
- 你真的了解实时计算吗?