Overlay a Combo-Box over a browse

Lukky

New Member
Hi all,

The Progress Programming Handbook says that it is possible to overlay a Combo-Box over a Browse widget to let the user select values from the Combo-Box.

I have tried the sample code, made for an overlay check-box but modified to use a Combo-Box, but I'm running into problems when the user drops down the Combo-Box: the Drop Down list shows very briefly then disapears.

I have tried different ways to solve this, but I'm at a point where I'd need to hear from others who might have might have succeeded.

Thanks.
 
U

Unregistered

Guest
pardon my english, try this first add your combo-box to the frame containing the browser

DEF BROWSE br-temporal QUERY q-temporal
DISPLAY Wtem-number COLUMN-LABEL "Number" WIDTH 15
Wtem-name COLUMN-LABEL "Name" WIDTH 25
Wtem-price COLUMN-LABEL "Price" WIDTH 10
Wtem-status COLUMN-LABEL "Status" WIDTH 20
ENABLE wtem-price
WITH 10 DOWN NO-BOX SEPARATORS.

DEF FRAME f-frame
BR-temporal
L-status NO-LABEL
WITH ROW 3 CENTERED OVERLAY NO-LABELS.

then you ned to hide the combo-box at the begining of your program.

L-status:HIDDEN IN FRAME f-frame = YES.
OPEN QUERY q-temporal FOR EACH W-temporal NO-LOCK.
ENABLE ALL EXCEPT L-status WITH FRAME f-frame.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW IN FRAME f-frame.

in my example after entering the price is time to use the combo-box

ON 'leave':U OF Wtem-price DO:
IF KEYFUNCTION(LASTKEY) = "RETURN" THEN
RUN getstatus.
END.

PROCEDURE getstatus:
/* first disable the browser and all of his fields */
/* next position the combo-box in the apropiate row */
/* bring combo-box into view */
/* enable combo-box */
/* after selecting the value */
/* you must assign this to the browser */
/* hide the combo-box */
/* enable the browser and all of his fields */
DISABLE BR-temporal WITH FRAME f-frame.
Wtem-price:READ-ONLY IN BROWSE BR-temporal = YES.
GET CURRENT q-temporal NO-LOCK.
IF AVAILABLE W-temporal THEN DO:
L-ciclo = L-status:LOOKUP(Wtem-status).
L-status:SCREEN-VALUE IN FRAME f-frame = L-status:ENTRY(L-ciclo).
END.
L-status:X IN FRAME f-frame = Wtem-status:X IN BROWSE BR-temporal.
L-status:Y IN FRAME f-frame = Wtem-status:Y IN BROWSE BR-temporal.
L-status:HIDDEN IN FRAME f-frame = NO.
ENABLE L-status WITH FRAME f-frame.
WAIT-FOR RETURN OF L-status IN FRAME f-frame.
GET CURRENT q-temporal EXCLUSIVE-LOCK.
IF AVAILABLE W-temporal THEN
ASSIGN Wtem-status = L-status:ENTRY(L-ciclo) IN FRAME f-frame.
GET CURRENT q-temporal NO-LOCK.
DISPLAY Wtem-status WITH BROWSE BR-temporal.
DISABLE L-status WITH FRAME f-frame.
L-status:HIDDEN IN FRAME f-frame = YES.
Wtem-price:READ-ONLY IN BROWSE BR-temporal = NO.
ENABLE ALL EXCEPT L-status WITH FRAME f-frame.
END.

i hope this helps you.

any comments e-mail me to plus_marca@yahoo.com.mx
 
Top