04.08.2013 Views

Printing - FoxTalk - dFPUG-Portal

Printing - FoxTalk - dFPUG-Portal

Printing - FoxTalk - dFPUG-Portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

* Initialize the variable for the current screen<br />

m.lnScreen = 1<br />

do while m.lnScreen # 0<br />

* Define the window, draw the header information,<br />

* and draw the buttons for the sub-screens<br />

do scr_main.spr<br />

* Draw the objects for the specific sub-screen<br />

* that you are working with<br />

do case<br />

* Display the Address information<br />

case m.lnScreen = 1<br />

do scr_sub1.spr<br />

* Display the Contacts information<br />

case m.lnScreen = 2<br />

do scr_sub2.spr<br />

* Display the Notes information<br />

case m.lnScreen = 3<br />

do scr_sub3.spr<br />

* More screens would be defined as required<br />

endcase<br />

* Process the READ<br />

READ CYCLE ;<br />

SHOW ReadShow() ;<br />

WHEN ReadWhen()<br />

Setup the navigation through the screens<br />

Now that the main loop is in place, the navigation controls have to be set up to help move<br />

through the sub-screens. This involves creating a procedure (NewScreen) to load the newly<br />

selected sub-screen and setting up the hot keys to navigate through the sub-screens. The<br />

following code is included with the initialization of the program:<br />

* Define total number of screens that you have available<br />

m.lnScreens = 3<br />

* Setup the hot keys to move through the screens<br />

ON KEY LABEL HOME DO NewScreen with 1<br />

ON KEY LABEL PGUP DO NewScreen with m.lnScreen-1<br />

ON KEY LABEL PGDN DO NewScreen with m.lnScreen+1<br />

[You might also consider setting up menu options such as First screen, Next screen, and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!