Manuals >User's Guide >Creating Graphic User Interfaces
Print version of this Book (PDF file)
prevnext

Viewing Pages Sequentially (Example)

Explore the Wizard tree by setting all the node symbols downward so as to show the entire hierarchy. It should look like this:

The Wizard (Vertical Table) contains ClientArea (Vertical Table) and ButtonArea (Vertical Table). Both of these can be selected by clicking on them and then clicking on Display...

In ClientArea there are six tables each containing an Edit Text item. If you double-click on any Text item you will see in the Properties dialog box that the Field Variable is set to a specific member of the ICCAP_ARRAY wizText which stores the contents of each page. The index into wizText is one less than the page number.

So why are not all six pages displayed simultaneously?

You can see the answer by double-clicking on the parent Table of each Edit Text item. You will see in the Properties dialog box that Managed is controlled by the array wizPage.

    • wizPage is an array of flags.
    • Only one of the flags is TRUE.
    • Only the page with the TRUE flag is managed (i.e. visible).
    • The rest are not visible and have zero size.
    • The macro showPage manages the wizPage flag array


Note


Click on the Model Variables tab to see the contents of the wizPage array.

It will normally have only one member set to 1 (TRUE). If you edit it as shown here with three members set to 1, and then select and display the wizard it will show three pages instead of one!


In the ButtonArea are the three buttons that appear at the bottom of the Wizard. The nested table scheme is simply to keep the Next and Back buttons next to each other at the right, and the Cancel button separate at the left.

Macros started by Push Buttons

Click on the Next (Push Button) at the bottom of the tree. In the Properties dialog box under Callbacks you will see Button Pressed (iccap_funct("nextWizard","Execute")). This simply means that the Next button calls the macro nextWizard. Similarly the Back button calls the macro backupWizard.

You can see the text of these macros by clicking on the Macros tab and selecting nextWizard and backupWiizard under the Select Macro: header.

As you can see these macros increase and decrease respectively the current page number, then they call the macro showPage.

The macro showPage

     Keeps the page number within the number of pages.
     Sets the flags backSense and nextSense when the ends of the range are reached.

The flags backSense and nextSense control the greying out of the paging buttons when the limit has been reached. See the greyed and `insensitive' Back button in the Figure above.

For the Next and Back buttons, look on the Properties dialog for Sensitivity which controls whether an item is disabled (insensitive), or if it is responding normally. They appear as Sensitivity (Variable nextSense) and Sensitivity (Variable backSense).


prevnext