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

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

本文简介:选择自 linzhengqun 的 blog

    borderbrush := createsolidbrush(colortorgb(fedgecolor));

    enterbrush:= createsolidbrush(colortorgb(fentercolor));

    outerbrush:=createsolidbrush(colortorgb(clwhite));

//not(csdesigning in componentstate保证在设计期不变

    if (not(csdesigning in componentstate)) and

    (mousein=true) then  //如果鼠标进入

    begin

      //画一个矩形框,用borderbrush画笔

      framerect(dc, r, borderbrush);

      //r缩小一个象素

      inflaterect(r, -1, -1);

      //画一个矩形框,用outerbrush画笔

      framerect(dc, r, outerbrush);

      inflaterect(r, -1, -1);

      framerect(dc, r, enterbrush);

    end

    else  //如果鼠标没有进入

    begin

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

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

go top