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

A啦Dbit 2012-02-04 04:26:17
我试过皮肤 SkinPPPowerBuilder.dll 和 SkinPlusPlusDLL.dll
都可以改grid线条的颜色,不知道是怎么实现的,
有人能赐教一下不
...全文
573 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
pawobiyoudier 2012-03-12
  • 打赏
  • 举报
回复
收费源码 可以实现

http://topic.csdn.net/u/20120309/14/df8e83a5-d255-4aa1-8d34-b6c2cbf5bde8.html?8021
PackChen 2012-03-11
  • 打赏
  • 举报
回复
皮肤和上面的SetSysColor()是一样的

不过是皮肤是HOOK然后强制改变传递的数据
不过PB对皮肤支持不是很好
建议不要用
A啦Dbit 2012-02-11
  • 打赏
  • 举报
回复
我试过这种方法,

ulong l_color0,l_color2,l_index=15

l_color0=rgb(240,240,240)

SetSysColors(1,l_index,l_color0) //修改系统颜色

这样可以改线条颜色,但是这样也会把系统中其它程序的窗口颜色也改掉了,
所以未实现,还请高人指点
A啦Dbit 2012-02-11
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 wu_07 的回复:]

这个可以改freeform的

global type gf_setbordercolor1 from function_object
end type

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

glo……
[/Quote]

我想改grid风格的,但是也很谢谢你
A啦Dbit 2012-02-11
  • 打赏
  • 举报
回复
但是我看skin++ 和 SkinPPPowerBuilder 还有setmagager等这些换肤程序都可以修改线条颜色,但我不想用皮肤,
w_wangbin 2012-02-11
  • 打赏
  • 举报
回复
这个问题是老生常谈了,目前好像没有什么技术可以实现改变grid的线条颜色的
wu_07 2012-02-10
  • 打赏
  • 举报
回复
这个可以改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
A啦Dbit 2012-02-05
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 smilysoft 的回复:]

这个不是可以直接修改吗?PB datawindow grid 风格的线条颜色 Pen Color属性
[/Quote]

阁下用的是PB什么版本,我用的pb12好像没有这个属性
PB菜鸟 2012-02-04
  • 打赏
  • 举报
回复
这个不是可以直接修改吗?PB datawindow grid 风格的线条颜色 Pen Color属性
A啦Dbit 2012-02-04
  • 打赏
  • 举报
回复
我不想用皮肤...请赐教...
A啦Dbit 2012-02-04
  • 打赏
  • 举报
回复
SatManager收费不...
pcwe2002 2012-02-04
  • 打赏
  • 举报
回复
SatManager可以改
xuam 2012-02-04
  • 打赏
  • 举报
回复
没用过这2个DLL,应该有相应的函数来调用吧?

604

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 控件与界面
社区管理员
  • 控件与界面社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧