Consultor Eletrônico



Kbase P163920: Horizontal scrollbar on DOWN frame not responding
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   4/16/2010
Status: Unverified

SYMPTOM(s):

Horizontal scrollbar on DOWN frame not responding

Horizontal scrollbar does not respond when last record is displayed in the DOWN frame.

FACT(s) (Environment):

Horizontal scrollbar does respond when last record is not displayed in the DOWN frame.
Window contains another frame with an UPDATE field that controls which records are displayed in the DOWN frame.
No blocking statements in the DOWN frame.
Frame with UPDATE field, then DOWN frame are displayed in a loop until the application is exited.
Code is similar to the following:
DEFINE VARIABLE matchCust AS INTEGER FORMAT ">>>>9" LABEL "Cust#" NO-UNDO.
FORM matchCust COLON 12 DEBLANK
WITH FRAME a SIDE-LABELS WIDTH 80 NO-VALIDATE.
FORM
Order.CustNum COLUMN-LABEL "Cust#" FORMAT "99999"
Order.Ordernum COLUMN-LABEL "Order#"
Order.OrderDate COLUMN-LABEL "Date"
Order.ShipDate COLUMN-LABEL "Shipped"
Order.PromiseDate COLUMN-LABEL "Promised"
Order.PO
Order.Creditcard
Order.Carrier
Order.Instructions
WITH FRAME b WIDTH 178 CENTERED DOWN.
VIEW FRAME a.
VIEW FRAME b.
_Select:
REPEAT ON ENDKEY UNDO, LEAVE WITH FRAME a:
STATUS DEFAULT.
UPDATE matchCust.
CLEAR FRAME b ALL NO-PAUSE.
FIND Customer NO-LOCK WHERE
Customer.CustNum = matchCust
NO-ERROR.
IF AVAIL Customer
THEN DO WITH FRAME b:
FOR EACH Order OF customer
WITH FRAME b:
DISPLAY
Order.CustNum
Order.Ordernum
Order.OrderDate
Order.ShipDate
Order.PromiseDate
Order.PO
Order.Creditcard
Order.Carrier
Order.Instructions
.
DOWN 1.
END. /* FOR EACH Order OF Customer */
END. /* IF AVAIL Customer */
ELSE DO:
CLEAR FRAME a NO-PAUSE.
END. /* [else] IF not AVAIL Customer */
END. /* REPEAT (_Select) */
All Supported Operating Systems
Progress/OpenEdge Product Family

CAUSE:

Because there is no blocking statement in the DOWN frame (frame b), once all records in frame b are displayed control goes back to the top of the loop, and blocks again on the UPDATE statement in frame a. This puts focus on frame a, so the scrollbar on frame b does not respond. However, when there are more records to be displayed than will fit in frame b, the procedure blocks until the user presses the spacebar to display the next set of records. While the procedure is blocked in frame b, its scrollbar responds to the keyboard.

FIX:

Add a blocking statement after the display of records in the DOWN frame. This will give the user an opportunity to scroll horizontally before going back to the UPDATE field to enter another value. Using the above example, the following two lines of code added after the display of Order records will block on the return key (another key could be used instead if desired):
...
END. /* FOR EACH Order OF Customer */
STATUS DEFAULT 'Press return to enter next customer number'.
WAIT-FOR RETURN OF FRAME b.
END. /* IF AVAIL Customer */
...