Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Popup command
Message
From
09/05/2002 15:12:28
Bill Totten
William Totten & Associates, Inc.
Indiana, United States
 
 
To
09/05/2002 08:50:56
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00654401
Message ID:
00654704
Views:
13
Jason:

1.) What do you mean when you say the GET command does not disappear from the screen once selected?

2.) I had various problems with POPUPs so I just created a BROWSE window to present the choices to the client. I created a PROCEDURE that creates a WINDOW that a BROWSE is done in. Here's the code;

PROC p0validrsn
PARA mxkey, esc_ok
malias = ALIAS()
SET NEAR ON
SEEK ALLTRIM(mxkey)
SET NEAR OFF
DEFINE WINDOW wvalid FROM 5,45 TO 22,71 ;
TITLE ' [ VALID REASONS ] ' COLOR SCHEME 10
DO WHILE .t.
IF mesc_ok
WAIT WINDOW 'Please select a valid REASON code. NO-CHOICE.' NOWAIT
ELSE
WAIT WINDOW 'You must select a valid REASON code.' NOWAIT
ENDIF
?? CHR(7)
ON KEY LABEL ENTER KEYB '{CTRL+W}'
SELECT spresnin
BROWSE FIELDS reason NOEDIT NODELETE WIND wvalid
ON KEY LABEL ENTER
IF LASTKEY() = 27 .AND. ! mesc_ok
LOOP
ENDIF
EXIT
ENDDO
RELEASE WINDOW wvalid
STORE IIF(LAST()=27,SPACE(LEN(reason)),reason) TO mxkey
IF LEN(malias) > 0
SELECT &malias
ENDIF
WAIT CLEAR
RETURN mxkey


The code assumes you have an INDEX TAG (or stand-alone index file) based on the key field the user is selecting. You could or course, nullify this requirement by creating a SQL query and ORDERing by the key field your user is looking to pick a value for.

Anyway, this is the method I chose - it's been working fine for about 7-8 years.....

Bill
Previous
Reply
Map
View

Click here to load this message in the networking platform