gpt4 book ai didi

progress-4gl - 使用 Progress 10.2b 如何让滚动条正常工作

转载 作者:行者123 更新时间:2023-12-04 05:51:11 26 4
gpt4 key购买 nike

在我的进度应用程序中使用浏览器时,滚动条永远不会正常工作。它会显示我只能向下滚动一点,然后继续前进。这是一个正在进行的错误还是我可以做些什么来解决这个问题?

/* Connected Databases 
sports2000 PROGRESS
*/
&Scoped-define WINDOW-NAME wWin
{adecomm/appserv.i}
CREATE WIDGET-POOL.
{src/adm2/widgetprto.i}
&Scoped-define PROCEDURE-TYPE SmartWindow
&Scoped-define DB-AWARE no
&Scoped-define ADM-CONTAINER WINDOW
&Scoped-define ADM-SUPPORTED-LINKS Data-Target,Data-Source,Page-Target,Update-Source,Update-Target,Filter-target,Filter-Source
&Scoped-define FRAME-NAME fMain
&Scoped-define BROWSE-NAME BROWSE-2
&Scoped-define INTERNAL-TABLES Order
&Scoped-define FIELDS-IN-QUERY-BROWSE-2 Order.PO Order.OrderDate ~
Order.Ordernum
&Scoped-define ENABLED-FIELDS-IN-QUERY-BROWSE-2 Order.PO Order.OrderDate ~
Order.Ordernum
&Scoped-define ENABLED-TABLES-IN-QUERY-BROWSE-2 Order
&Scoped-define FIRST-ENABLED-TABLE-IN-QUERY-BROWSE-2 Order
&Scoped-define QUERY-STRING-BROWSE-2 FOR EACH Order NO-LOCK INDEXED-REPOSITION
&Scoped-define OPEN-QUERY-BROWSE-2 OPEN QUERY BROWSE-2 FOR EACH Order NO-LOCK INDEXED-REPOSITION.
&Scoped-define TABLES-IN-QUERY-BROWSE-2 Order
&Scoped-define FIRST-TABLE-IN-QUERY-BROWSE-2 Order
&Scoped-define OPEN-BROWSERS-IN-QUERY-fMain ~
~{&OPEN-QUERY-BROWSE-2}
&Scoped-Define ENABLED-OBJECTS BROWSE-2
DEFINE VAR wWin AS WIDGET-HANDLE NO-UNDO.

DEFINE QUERY BROWSE-2 FOR
Order SCROLLING.
DEFINE BROWSE BROWSE-2
QUERY BROWSE-2 NO-LOCK DISPLAY
Order.PO FORMAT "x(20)":U
Order.OrderDate FORMAT "99/99/99":U
Order.Ordernum FORMAT "zzzzzzzzz9":U
ENABLE
Order.PO
Order.OrderDate
Order.Ordernum
WITH NO-ROW-MARKERS SEPARATORS SIZE 59 BY 8.1 FIT-LAST-COLUMN.
/* ************************ Frame Definitions *********************** */
DEFINE FRAME fMain
BROWSE-2 AT ROW 4.81 COL 13 WIDGET-ID 200
WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY
SIDE-LABELS NO-UNDERLINE THREE-D
AT COL 1 ROW 1
SIZE 80 BY 17 WIDGET-ID 100.

IF SESSION:DISPLAY-TYPE = "GUI":U THEN
CREATE WINDOW wWin ASSIGN
HIDDEN = YES
TITLE = "<insert SmartWindow title>"
HEIGHT = 17
WIDTH = 80
MAX-HEIGHT = 28.81
MAX-WIDTH = 146.2
VIRTUAL-HEIGHT = 28.81
VIRTUAL-WIDTH = 146.2
RESIZE = no
SCROLL-BARS = no
STATUS-AREA = no
BGCOLOR = ?
FGCOLOR = ?
THREE-D = yes
MESSAGE-AREA = no
SENSITIVE = yes.
ELSE {&WINDOW-NAME} = CURRENT-WINDOW.

{src/adm2/containr.i}
IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(wWin)
THEN wWin:HIDDEN = yes.
&Scoped-define SELF-NAME wWin
ON END-ERROR OF wWin /* <insert SmartWindow title> */
OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO:
/* This case occurs when the user presses the "Esc" key.
In a persistently run window, just ignore this. If we did not, the
application would exit. */
IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY.
END.

ON WINDOW-CLOSE OF wWin /* <insert SmartWindow title> */
DO:
/* This ADM code must be left here in order for the SmartWindow
and its descendents to terminate properly on exit. */
APPLY "CLOSE":U TO THIS-PROCEDURE.
RETURN NO-APPLY.
END.

&Scoped-define BROWSE-NAME BROWSE-2
&UNDEFINE SELF-NAME

/* *************************** Main Block *************************** */

/* Include custom Main Block code for SmartWindows. */
{src/adm2/windowmn.i}

/* ********************** Internal Procedures *********************** */

PROCEDURE adm-create-objects :

END PROCEDURE.

PROCEDURE disable_UI :
/* Delete the WINDOW we created */
IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(wWin)
THEN DELETE WIDGET wWin.
IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE.
END PROCEDURE.


PROCEDURE enable_UI :
ENABLE BROWSE-2
WITH FRAME fMain IN WINDOW wWin.
{&OPEN-BROWSERS-IN-QUERY-fMain}
VIEW wWin.
END PROCEDURE.


PROCEDURE exitObject :

APPLY "CLOSE":U TO THIS-PROCEDURE.
RETURN.

END PROCEDURE.

当我使用这样的浏览器时,我将滚动条拉到底部,然后单击滚动条上的向下箭头,仍然有行(即使滚动条位于屏幕底部)。

最佳答案

我重新编写了您的示例代码以使用“sports2000”数据库,我可以看到发生了什么。

define query browse-4 for customer.

DEFINE BROWSE BROWSE-4
QUERY BROWSE-4 NO-LOCK DISPLAY
custNum name
/* ENABLE name */
WITH NO-ROW-MARKERS SEPARATORS SIZE 32 BY 6.46 FIT-LAST-COLUMN.
.

open query browse-4 preselect each customer no-lock.

enable browse-4.

wait-for window-close of current-window.

关键的变化是在 OPEN QUERY 中使用 PRESELECT。否则只返回结果集的一部分。这是一个已知的特征。

不过要小心——如果您的查询涉及数千条记录,则 PRESELECT 不会执行得很好。当然,在 UI 中呈现这么多记录可能是一个坏主意。

关于progress-4gl - 使用 Progress 10.2b 如何让滚动条正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10018519/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com