Consultor Eletrônico



Kbase P90529: How to open a windows style file browser, select a file, and have its name appear in a fill-in on th
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   26/10/2004
Status: Unverified

GOAL:

How to open a windows style file browser, select a file, and have its name appear in a fill-in on the click of a button?

FACT(s) (Environment):

Windows

FIX:

Create a CHOOSE event trigger for the button with code similar to:


ON CHOOSE OF BUTTON-1 IN FRAME DEFAULT-FRAME /* Button 1 */
DO:
DEFINE VARIABLE procname AS CHARACTER NO-UNDO.
DEFINE VARIABLE OKpressed AS LOGICAL INITIAL TRUE.

SYSTEM-DIALOG GET-FILE procname
TITLE "Choose Procedure to Run ..."
FILTERS "Source Files (*.*)" "*.*"
MUST-EXIST
USE-FILENAME
UPDATE OKpressed.
IF OKpressed = TRUE THEN
FILL-IN-1:SCREEN-VALUE = procname.
END.