给freeform数据窗口列穿上彩色外套

来源:互联网 发布:pdf转电子杂志软件 编辑:程序博客网 时间:2024/04/27 16:00
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

   pb中数据窗口列的边框风格只有简单几种,如果想要边框颜色是彩色的就没有办法了。

  其实可以利用动态创建rectangle,更改数据窗口列的边框颜色,主要适用free格式(不需要穿外套的列tag值设为0)。

 globaltypegf_setbordercolorfromfunction_objectendtype

forwardprototypesglobalsubroutinegf_setbordercolor(datawindowadw,longal_bodercolor)endprototypes

globalsubroutinegf_setbordercolor(datawindowadw,longal_bodercolor);//rectangle(band=detailx="599"y="260"height="88"width="288" name=r_1brush.hatch="7"brush.color="1627389951"pen.style="0"pen.width="5"pen.color="8421376" background.mode="1"background.color="553648127")IntegeriStringls_syntax

Fori=1ToInteger(adw.Object.DataWindow.Column.Count) Ifadw.Describe("#"+String(i)+".Visible")='1' and adw.Describe(ls_objects[i]+".tag")<>'0'Then  ls_syntax+="createrectangle(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")' EndIfNextadw.Modify(ls_syntax)

endsubroutine


<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击