Adding Form Navigation Buttons
When you ran your application and displayed the Show
All Members form, you may have noticed that the only thing you can
do in this window is close the form with the close box (in the upper
right corner of the window) to go back to the Add a New Member form.
Add some navigation buttons to the FanClub application:
x
Procedure: How to Add a Back Button
-
Open
the ShowFan form.
-
On the
Maintain Controls palette, select the Button
control.
-
Draw
a button under the HTML table.
-
Change
the text on the button to Back.
-
Change
the name of the button to BackButton.
-
Double-click
the button to open the Event Handler editor.
-
In the
Event Handler editor, select the Click event.
-
Click the Close form
button
on the right side of the window.
This inserts the following code in the box:
self.WinClose();
-
Close
the Event Handler editor.
-
Click Yes to
save your procedure.
x
Procedure: How to Add an Exit Button
-
Open
Form1.
-
Place
an Exit button named ExitButton at the bottom of your form.
Tip: Use the Button control to draw a button at
the bottom of your form. Change the text to Exit and
the name to ExitButton.
-
Open
the Event Handler editor.
-
In the
Event Handler editor, select the Click event.
-
Click
the Close application
button on
the right side of the window.
This puts the following code in the box:
self.WinExit();
-
Close
the Event Handler editor.
-
Click Yes to
save your procedure.
-
Deploy
and run your application to see how it looks.
-
Click
the Exit button to close the application. Then
close the Developer Studio Viewer before continuing the tutorial.
Note: When you click Exit,
you see the WFmstart.html page in the Developer Studio Viewer. This
is the Developer Launch Console. For more information, see Running WebFOCUS Maintain Applications in
the Developing WebFOCUS Maintain Applications manual.