4D v13.4

FORM Get current page

Home

 
4D v13.4
FORM Get current page

FORM Get current page 


 

FORM Get current page {( * )} -> Function result 
Parameter Type   Description
Operator in Returns number of current subform page
Function result  Longint in Number of currently displayed form page

The FORM Get current page command returns the number of the currently displayed form page.

The * parameter is useful when the command is called in the context of a page type subform containing several pages. In this case, when you pass this parameter, the command changes the page of the current subform (the one that called the command). By default, when the * parameter is omitted, the command is always applied to the parent form.

Example  

In a form, when you select a menu item from the menu bar or when the form receives a call from another process, you can perform different actions depending on the form page currently displayed. In this example, you write:

  ` [myTable];"myForm" Form Method
 Case of
    :(Form event=On Load)
  ` ...
    :(Form event=On Unload)
  ` ...
    :(Form event=On Menu Selected)
       $vlMenuNumber:=Menu selected>>16
       $vlItemNumber:=Menu selected & 0xFFFF
       Case of
          :($vlMenuNumber=...)
             Case of
                :($vlItemNumber=...)
                :(FORM Get current page=1)
  ` Do appropriate action for page 1
                :(FORM Get current page=2)
  ` Do appropriate action for page 2
  ` ...
                :($vlItemNumber=...)
  ` ...
             End case
          :($vlMenuNumber=...)
  ` ...
       End case
    :(Form event=On Outside Call)
       Case of
          :(FORM Get current page=1)
  ` Do appropriate reply for page 1
          :(FORM Get current page=2)
  ` Do appropriate reply for page 2
       End case
  ` ...
 End case

 
PROPERTIES 

Product: 4D
Theme: Forms
Number: 276

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: < 4D v6
Renamed: 4D v12
Modified: 4D v13

 
SEE ALSO 

FORM FIRST PAGE
FORM GOTO PAGE
FORM LAST PAGE
FORM NEXT PAGE
FORM PREVIOUS PAGE