Adding Form Navigation Buttons

How to:

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:


Top of page

x
Procedure: How to Add a Back Button
  1. Open the ShowFan form.
  2. On the Maintain Controls palette, select the Button control.
  3. Draw a button under the HTML table.
  4. Change the text on the button to Back.
  5. Change the name of the button to BackButton.
  6. Double-click the button to open the Event Handler editor.
  7. In the Event Handler editor, select the Click event.
  8. Click the Close form Close form button button on the right side of the window.

    This inserts the following code in the box:

    self.WinClose();
  9. Close the Event Handler editor.
  10. Click Yes to save your procedure.

Top of page

x
Procedure: How to Add an Exit Button
  1. Open Form1.
  2. 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.

  3. Open the Event Handler editor.
  4. In the Event Handler editor, select the Click event.
  5. Click the Close application Close application button button on the right side of the window.

    This puts the following code in the box:

    self.WinExit();
  6. Close the Event Handler editor.
  7. Click Yes to save your procedure.
  8. Deploy and run your application to see how it looks.
  9. 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.


WebFOCUS