当前位置: 代码迷 >> PB >> PB datawindow grid 风格的线条颜色有人会改不?解决办法
  详细解决方案

PB datawindow grid 风格的线条颜色有人会改不?解决办法

热度:492   发布时间:2016-04-29 06:21:56.0
PB datawindow grid 风格的线条颜色有人会改不?
我试过皮肤 SkinPPPowerBuilder.dll 和 SkinPlusPlusDLL.dll
都可以改grid线条的颜色,不知道是怎么实现的,
有人能赐教一下不
------解决方案--------------------
没用过这2个DLL,应该有相应的函数来调用吧?
------解决方案--------------------
SatManager可以改
------解决方案--------------------
这个不是可以直接修改吗?PB datawindow grid 风格的线条颜色 Pen Color属性
------解决方案--------------------
这个可以改freeform的

global type gf_setbordercolor1 from function_object
end type

forward prototypes
global subroutine gf_setbordercolor1 (datawindow adw, long al_bodercolor)
end prototypes

global subroutine gf_setbordercolor1 (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 i
String ls_syntax

string  ls_objects[],ls_tmp  
long  ll_pos,ll_tmp  
ll_pos=0  
ls_tmp=adw.Describe("Datawindow.Objects")  
do  while  pos(ls_tmp,char(9))<>0  
   ll_tmp=pos(ls_tmp,char(9))  
   ll_pos=ll_pos+1  
   ls_objects[ll_pos]=left(ls_tmp,ll_tmp - 1)  
   ls_tmp=right(ls_tmp,len(ls_tmp) - ll_tmp)  
loop  
ll_pos=ll_pos+1  
ls_objects[ll_pos]=ls_tmp  
string setting 
for i=1  to  ll_pos  
//setting  =  adw.Describe(ls_objects[i]+".Type")  
//   Choose    Case  lower(setting)
// case "column"
// If adw.Describe(ls_objects[i]+".Visible") = '1' Then
// ls_syntax += " create rectangle(band=detail "
// ls_syntax += ' x="'+ String(Integer(adw.Describe(ls_objects[i]+".X")) - 4)+'"'
// ls_syntax += ' y="'+  String(Integer(adw.Describe(ls_objects[i]+".Y")) - 4)+'"'
// ls_syntax += ' Height="'+  String(Integer(adw.Describe(ls_objects[i]+".Height")) + 8)+'"'
// ls_syntax += ' Width="'+  String(Integer(adw.Describe(ls_objects[i]+".Width")) + 8)+'"'
// ls_syntax += ' name=RBorder_'+ adw.Describe(ls_objects[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" )'
// case "text"

If adw.Describe(ls_objects[i]+".Visible") = '1' and  adw.Describe(ls_objects[i]+".tag") <> '0' Then
      
ls_syntax += " create rectangle(band="+adw.Describe(ls_objects[i]+".Band")+" "
ls_syntax += ' x="'+ String(Integer(adw.Describe(ls_objects[i]+".X")) - 4)+'"'
ls_syntax += ' y="'+  String(Integer(adw.Describe(ls_objects[i]+".Y")) - 4)+'"'
ls_syntax += ' Height="'+  String(Integer(adw.Describe(ls_objects[i]+".Height")) + 8)+'"'
ls_syntax += ' Width="'+  String(Integer(adw.Describe(ls_objects[i]+".Width")) + 8)+'"'
ls_syntax += ' name=RBorder_'+ adw.Describe(ls_objects[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 If

next  








//For i = 1 To Integer(adw.Object.DataWindow.Column.Count)*2
// string ls
// ls=adw.Describe("#"+String(i)+".Name")
// If adw.Describe("#"+String(i)+".Visible") = '1' Then
// ls_syntax += " create rectangle(band=detail "
// 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 If
//Next
adw.Modify(ls_syntax)

end subroutine
------解决方案--------------------
这个问题是老生常谈了,目前好像没有什么技术可以实现改变grid的线条颜色的
------解决方案--------------------
皮肤和上面的SetSysColor()是一样的

不过是皮肤是HOOK然后强制改变传递的数据
不过PB对皮肤支持不是很好
建议不要用
------解决方案--------------------
  相关解决方案