Run the application

Note

Now you run the application to see how it works. At this point the application does not do very much. By running the application, you can see the windows and menus that were created for you when PowerBuilder generated the application based on your choices. You will modify them later.

  1. Click the Run button on the PowerBar.

    Run button

    The MDI frame window displays and is maximized. All MDI applications created using the Wizard have a menu bar and a toolbar with some items already coded for you.

  2. Select File>New>Maintain Customers.

    The application opens a sheet window. The display name that you typed in the Template Application wizard for Sheet 1 appears in the title bar. The sheet window title has a number after it to indicate the instance of the window that displays.

    NoteAbout the number in the window title bar The number 1 appears following the window title because this is the first instance of the w_customers sheet window that is open. The code that adds the instance number to the title bar is in the ue_postopen event of the w_master_detail_ancestor base sheet window.

    Shown is the window title bar with the text Maintain Customers : 1.
  3. Select File>New>Maintain Products.

    A second application sheet window displays.

  4. Select Window>Tile Horizontal.

    The sheet windows are arranged horizontally inside the MDI frame, with the active sheet window at the top.

  5. Select File>Toolbars from the menu bar.

    The application displays the Toolbars dialog box.

  6. Select Floating in the Toolbars dialog box.

    The toolbar floats within the MDI frame. You might need to move the Toolbars dialog box to see the floating toolbar.

  7. Select Top.

    The toolbar is repositioned at the top of the frame.

  8. Click Done to close the Toolbars dialog box.

  9. Select File>Exit.

    The application closes and you return to the PowerBuilder development environment.

    When you exit and restart PowerBuilder, you might want to have PowerBuilder in the state it was in when you exited, with the workspace and painters you were working in open.

  10. Select Tools>System Options from the menu bar and then click the Workspaces tab.

    Shown is the Work spaces tab of the System Options screen. At top is a cleared check box for Show start dialog at startup with no workspace, and then selected check boxes for Reopen workspace on startup and Reload painters when opening workspace.
  11. Make sure the Reopen Workspace On Startup and the Reload Painters When Opening Workspace check boxes are selected.

    Click OK.

    Now when PowerBuilder starts up, it opens the workspace and the painters that were open when you exited. If you were coding in PowerBuilder when you exited, the last script you were working on opens at the last line you edited.