Equinox Online Help - Language Reference - A to Z

Home

ShowPage

Applies to
SyntaxShowPage PageExpression [, SwitchExpression]
Action[Statement] Displays or hides a form page.
ScopeOnly usable in form methods.
Notes

This statement displays or hides a form page, where the argument PageExpression is the page's object name. Note that the object name is a string. If supplied as a constant, it must be enclosed in quotation marks.

SwitchExpression is evaluated as follows:

  • 0 Hide
  • 1 Show
  • 2 Show, on top of other pages
  • 3 No change, but set "on top" property
  • 4 No change, but clear "on top" property

If you omit SwitchExpression, it defaults to 1. If the page cannot be located, an error number is stored in the system workarea SysError.

You should note that you cannot hide the current page, as this could result in no page appearing at all. You must first select a new page using the ChangePage statement.

This statement is particularly useful for form button methods. You can provide a button that allows the user to show a hidden form page.

The system workarea SysError is set to a non-zero value if an error occurs, otherwise zero.

CategoryForms
See Also ChangeEditLine, ChangeGroup, ChangeObject, ChangePage, CurrentEventName, CurrentGroupName, CurrentObjectName, CurrentPageName, DefaultHelp, EnableGroup, EnablePage, Get, IsPageScroll, NextObjectName, Set, SetDefaultHelp, SetEquinoxTitle, SetPageScroll, SetPageTitle
Example

This method (which could be attached to a button) swaps between two form pages. The currently active page is kept in the temporary workarea ActivePage.

if ActivePage = 1 then
ShowPage "OrderTwo"
ChangePage "OrderTwo"
ShowPage "OrderOne", false
ActivePage = 2
else
ShowPage "OrderOne"
ChangePage "OrderOne"
ShowPage "OrderTwo", false
ActivePage = 1
end if