Powerbuilder:弹出窗口的定位
我有一个主从数据窗口。在详细信息窗口中,当用户单击一行时,我将打开另一个数据窗口作为弹出数据窗口,该窗口位于用户单击的行的正下方。只要详细信息窗口中的行数少于 11 行,它就可以正常工作。当窗口包含超过 11 行并且用户单击下部区域中的一行时,弹出窗口不会放置在应有的位置。
我的猜测是,当用户单击下部区域中的一行时,窗口会滚动到底部,并且某些行会因滚动而隐藏。如果由于滚动而隐藏了两行,则弹出窗口将在所需行下方打开两行。我的定位逻辑如下 -
// "parent" is the user object that contains the datawindow
// "row" contains clicked row number
// "this" points to the detail datawindow
ll_detail_height = long(this.Object.DataWindow.Detail.Height)
dw_status.y = this.y + ( ll_detail_height * (row) ) + parent.y
我该如何解决这个问题?
I have a master-detail datawindow. In the detail window, when user clicks on a row, I am opening another datawindow as a Pop up datawindow which is positioned just below the row on which the user clicked. It works fine as long as there are less that 11 rows in the detail window. When the window contains more than 11 rows and the user clicks on a row from lower region, the popup isn't placed where it's supposed to be.
My guess is that when the user clicks on a row in the lower region, the window is scrolled to the bottom and some rows gets hidden as a result of scrolling. If two rows gets hidden as a result of scrolling, the popup is opening tow rows below the desired row. My positioning logic is as below -
// "parent" is the user object that contains the datawindow
// "row" contains clicked row number
// "this" points to the detail datawindow
ll_detail_height = long(this.Object.DataWindow.Detail.Height)
dw_status.y = this.y + ( ll_detail_height * (row) ) + parent.y
How can I resolve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到解决办法了技巧是使用详细数据窗口的 FirstRowOnPage 属性并使用它来确定 y 位置 -
I've got the solution. The trick is to use
FirstRowOnPage
property of the detail datawindow and use it to determine they
position -