当前位置: 代码迷 >> PB >> 这样的DW是如何做的
  详细解决方案

这样的DW是如何做的

热度:10   发布时间:2016-04-29 06:36:27.0
这样的DW是怎么做的?
我下了一个程序,PB9做的,他这个台位图是这样的.


我找了一下源程序,发现就是一个DW....
有图为证.



请教一下高手,这种DW是怎么做出来的,给个思路.
我看了一下RESOUCE,里面引用了一些图片.....

------解决方案--------------------

我做出来是这样的,没有他们这个好看。
------解决方案--------------------
n-up类型的数据窗口,每行显示的项目数,取决于 dw_control.Object.DataWindow.Rows_Per_Detail 属性,不过Rows_Per_Detail是只读属性,在设计模式下设置为多少就是多少,这对已自适应宽度的dw来说是个缺陷,因为当数据窗口宽度变宽后,每行显示的项目数还是那么多,会导致数据窗口右边都是空白的,界面显示不美观也不合理。要解决这种缺陷,可以在dw的resize事件中,对dw的syntax进行重新构造,根据dw的width来决定Rows_Per_Detail的大小,并动态添加对象。最后重新对dw进行create。【当然在重新create前,需要先取出数据:string ls; ls = dw_control.object.datawindow.data 。create后再导入数据: dw_control.importstring(ls) 】

------解决方案--------------------
label类型DW的效果:

------解决方案--------------------
那是我公司的软件的界面,15楼【yyoinge】已经说得非常详细了。 扣扣:420859656
//设置功能界面自动适用屏幕宽度调整N-UP每一行的个数

string ls_syntax,ls_syntax1
string ls_modify
string ls_err
int i
long ll_bound
long ll_row
long ll_num,ll_width,ll_pos,ll_len,ll_dwwidth,ll_per_num
long ll_x

ls_syntax = dw_menu.describe('datawindow.syntax')
ll_width = 576
ll_dwwidth = dw_menu.width
ll_num = ll_dwwidth / ll_width
ll_x = (ll_dwwidth - ll_width*ll_num ) / 2
ll_len = len("rows_per_detail=")
ll_pos = pos(ls_syntax,"rows_per_detail=")
if ll_pos > 0 then 
ll_per_num = long(mid(ls_syntax,ll_pos+ll_len,pos(ls_syntax,')',ll_pos) -ll_pos -ll_len))
// messagebox('',mid(ls_syntax,ll_pos+ll_len,pos(ls_syntax,')',ll_pos) -ll_pos -ll_len))
ls_syntax1 = replace(ls_syntax,ll_pos,ll_len+1,"rows_per_detail=" + string(ll_num))
else
ls_syntax1 = ls_syntax
end if
dw_menu.create(ls_syntax1,ls_err)

for i = 1 to ll_per_num
ls_modify =  "destroy  menu_pic_"+string(i)
dw_menu.modify( ls_modify)
ls_modify =  "destroy  menu_name_"+string(i)
dw_menu.modify( ls_modify)
ls_modify =  "destroy  is_cur_"+string(i)
dw_menu.modify( ls_modify)
// ls_modify =  "destroy  rr_pic_"+string(i)
// dw_menu.modify( ls_modify)
// ls_modify =  "destroy  rr_text_"+string(i)
// dw_menu.modify( ls_modify)
// ls_modify =  "destroy  rr_bg_"+string(i)
// dw_menu.modify( ls_modify)
next

for i = 1 to ll_num
// ls_modify = 'create roundrectangle(band=detail ellipseheight="36" pointer="HyperLink!" ellipsewidth="41" x="'+string((i -1)*ll_width+23)+'" y="92" height="364" width="507"  name=rr_bg_'+string(i)+' visible="1~tif( is_cur[1]="",1,0)" brush.hatch="6" brush.color="15780518" pen.style="0" pen.width="5" pen.color="65535"  background.mode="2" background.color="33554432" background.transparency="0" background.gradient.color="8421504" background.gradient.transparency="0" background.gradient.angle="0" background.brushmode="0" background.gradient.repetition.mode="0" background.gradient.repetition.count="0" background.gradient.repetition.length="100" background.gradient.focus="0" background.gradient.scale="100" background.gradient.spread="100" tooltip.backcolor="134217752" tooltip.delay.initial="0" tooltip.delay.visible="32000" tooltip.enabled="0" tooltip.hasclosebutton="0" tooltip.icon="0" tooltip.isbubble="0" tooltip.maxwidth="0" tooltip.textcolor="134217751" tooltip.transparency="0" )'
// dw_menu.modify(ls_modify)
// ls_modify = 'create roundrectangle(band=detail pointer="HyperLink!" ellipseheight="36" ellipsewidth="41" x="'+string((i -1)*ll_width+123)+'" y="92" height="256" width="311"  name=rr_pic_'+string(i)+' visible="0" brush.hatch="6" brush.color="16777215" pen.style="0" pen.width="5" pen.color="67108864"  background.mode="2" background.color="33554432" background.transparency="0" background.gradient.color="8421504" background.gradient.transparency="0" background.gradient.angle="0" background.brushmode="0" background.gradient.repetition.mode="0" background.gradient.repetition.count="0" background.gradient.repetition.length="100" background.gradient.focus="0" background.gradient.scale="100" background.gradient.spread="100" tooltip.backcolor="134217752" tooltip.delay.initial="0" tooltip.delay.visible="32000" tooltip.enabled="0" tooltip.hasclosebutton="0" tooltip.icon="0" tooltip.isbubble="0" tooltip.maxwidth="0" tooltip.textcolor="134217751" tooltip.transparency="0" )'
  相关解决方案