pb中数据窗口列的边框风格只有简单几种,如果想要边框颜色是彩色的就没有办法了。
其实可以利用动态创建rectangle,更改数据窗口列的边框颜色,主要适用free格式(不需要穿外套的列tag值设为0)。
global type gf_setbordercolor from function_objectend type
forward prototypesglobal subroutine gf_setbordercolor (datawindow adw, long al_bodercolor)end prototypes
global subroutine gf_setbordercolor (datawindow adw, long al_bodercolor);//rectangle(band=detail x="599" y="260" height="88" width="288" name=r_1 brush.hatch="7" brush.color="1627389951" pen.style="0" pen.width="5" pen.color="8421376" background.mode="1" background.color="553648127" )integer istring ls_syntax
for i = 1 to integer(adw.object.datawindow.column.count) if adw.describe("#"+string(i)+".visible") = 1 and adw.describe(ls_objects[i]+".tag") <> 0 then ls_syntax += " create rectangle(band="+adw.describe("#"+string(i)+".band")+" " ls_syntax += x="+ string(integer(adw.describe("#"+string(i)+".x")) – 4)+" ls_syntax += y="+ string(integer(adw.describe("#"+string(i)+".y")) – 4)+" ls_syntax += height="+ string(integer(adw.describe("#"+string(i)+".height")) + 8)+" ls_syntax += width="+ string(integer(adw.describe("#"+string(i)+".width")) + 8)+" ls_syntax += name=rborder_+ adw.describe("#"+string(i)+".name") ls_syntax += brush.hatch="7" brush.color="1627389951" pen.style="0" pen.width="5" pen.color="+string(al_bodercolor)+" background.mode="1" background.color="553648127" ) end ifnextadw.modify(ls_syntax)
end subroutine
