Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Support of @...GET as an object in VFP 6.0
Message
From
05/04/2001 04:38:04
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
04/04/2001 15:02:28
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00492068
Message ID:
00492258
Views:
14
>I've read some posts and what-not which say that "_CUROBJ = value" is unreliable or just doesn't work. So what I'm looking for is a way to mix the
>@...GET type text box with a sort of OOP methodology to be able to call
>SetFocus() for the text boxes.
>

Check this out: (you'll have to add your "button" captions... it's fouling HTML)
m.LO_Form = .F.

SET TALK OFF

DEFINE WINDOW entry FROM 4,14 TO 14,65 ;
   TITLE "Input Window" FLOAT SHADOW SYSTEM COLOR SCHEME 8 ;
   NAME LO_Form

ACTIVATE WINDOW entry

DO WHILE .T. &&jem
   @ 2,2 SAY "First Name:"
   @ 4,2 SAY "Last Name:"

   @ 2,16 GET firstname SIZE 1,24 DEFAULT "" ;
      NAME txtFirstName

   @ 4,16 GET lastname SIZE 1,24 DEFAULT ""
   @ 6,14 GET button FUNCTION "*HN \?\..." ;
      SIZE 1,9,2 DEFAULT "" VALID clearexit()

   READ CYCLE OBJECT 1

   if readkey(0) = 2
   exit
   endif
ENDDO && jem

RELEASE WINDOW entry

FUNCTION clearexit
   DO CASE
   CASE button = "Clear"
      firstname = SPACE(10)
      lastname = SPACE(10)
      @ 7,14 SAY " "
      @ 7,34 SAY " "
      @ 8,14 SAY " "
      @ 8,34 SAY " "

      && _curobj = 1

      m.LO_Form.PageFrame1.Page1.txtFirstName.SetFocus()

      SHOW GETS
      WAIT WINDOW "Enter Name Again" NOWAIT
   CASE button = "Exit"
      CLEAR READ
      WAIT WINDOW "Entry Complete" NOWAIT
ENDCASE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform