pdox 4.0 dos - fieldview and escape key 
Author Message
 pdox 4.0 dos - fieldview and escape key

Hi,

A question on using fieldview and escape key:

When I am in a memo field in a form (fieldview) and I hit "Escape"
key(just to test my script), the script just bring me back to my
application menu with the form still there.

I have in my script:

wait workspace
..
..
case (eventrecord["keycode"] = 27):   ;escape key
      if isfieldview() = "True"
      then end fieldview
      clearimage
      clearimage
      return 0
      endif

However, when I am in a field other than memo field, ESCAPE key works
perfectly right: It clears the screen, bringing me back to my application
menu.

What I want is to either ignore the escape key while in fieldview mode, or
to bring me back to the application menu.  Can someone suggest
anything that might be wrong ?

Thank you!

mc



Mon, 29 Dec 1997 03:00:00 GMT
 pdox 4.0 dos - fieldview and escape key

Quote:

>Hi,

>A question on using fieldview and escape key:

>When I am in a memo field in a form (fieldview) and I hit "Escape"
>key(just to test my script), the script just bring me back to my
>application menu with the form still there.

>I have in my script:

>wait workspace
>..
>..
>case (eventrecord["keycode"] = 27):   ;escape key
>      if isfieldview() = "True"
>      then end fieldview
>      clearimage
>      clearimage
>      return 0
>      endif

>However, when I am in a field other than memo field, ESCAPE key works
>perfectly right: It clears the screen, bringing me back to my application
>menu.

>What I want is to either ignore the escape key while in fieldview mode, or
>to bring me back to the application menu.  Can someone suggest
>anything that might be wrong ?

>Thank you!

>mc

How about:

 while true
  wait workspace until 27,etc
   switch
    case retval=27:
     if isfieldview()=true then
      message"user must close fieldview before pressing ESC."
      loop
     else
      clear
      clearall
      quitloop
     endif

     ;rest of switch if necessary
   endswitch
   endwhile

I do it this way because I've run into problems with trying to
close a field view on memo and other fields with code.  The only
reliable way is to have the user explicitly close the field view.

Bill Nauroth



Tue, 30 Dec 1997 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. pdox 4.0(dos) - OK, CANCEL and Escape Key

2. pdox 4.0(dos) - Keys locking

3. pdox 4.0 (DOS) Automatic Key Field?

4. Pdox 4.0 DOS - Keyed fields in desending order??

5. PDOX 4.0 for DOS and PDOX for Windows

6. The ESCAPE key in FoxPro 2.6 Professional for DOS

7. ON ESCAPE versus ON KEY LABEL ESCAPE

8. DOS 3.5 -- Fieldview and Picture Defs.

9. Printing Pdox 4.0 for DOS reports via USB port

10. Pdox 4.0/DOS/RT Error with Win95

11. Can Pdox 4.0/DOS install to CD?

12. Prob LPT Pdox DOS 4.0


 
Powered by phpBB® Forum Software