组件制作之四(定制外观)[9]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 linzhengqun 的 blog

  fedgecolor := $ff0000;

  fentercolor := $0000ff;

  //设定外观,平面无边形

  ctl3d := false;

  fmargin:=0;

  borderstyle:=bsnone;

  height:=150;

  width:=200;

end;

 

procedure tcoolmemo.setmargin(value:byte);

var

  rect: trect;

begin

//该消息取得客户区的尺寸

  sendmessage(handle, em_getrect, 0, longint(@rect));

  //以下是重新确定尺寸

  rect.top := value;

  rect.left := value;

  rect.right := width -value;

  rect.bottom := height -value;

//该消息设定客户区的大小

  sendmessage(handle, em_setrect, 0, longint(@rect));

  fmargin:=value;

end;

 

本文关键:组件制作之四(定制外观)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top