2009年1月7日星期三

PB子窗口的位置

在一数据窗口的数据项上双击后,弹出一子窗口,我想让子窗口刚好处在该数据项的下方,如何定位这个子窗口?
我想使用dw_1.move(x,y),那么x,y如何确定?

===================================
手头有个例子,move了一个userobj在相应的item下面,写在dw的 clicked event里面,供参考

if row>0 and (dwo.name = 'emp_id' or dwo.name = 'emp_fname' )then
int li_empid
li_empid= getitemnumber(row,'emp_id')
uo_empinfo.dw_emp.retrieve(li_empid)
uo_empinfo.x= parent.pointerx()+200
uo_empinfo.y= parent.pointery()
if ((uo_empinfo.y+uo_empinfo.height) > parent.height) then
uo_empinfo.y = (parent.height - uo_empinfo.height)
end if
uo_empinfo.visible = true
else
uo_empinfo.visible = false
end if

没有评论: