This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
FORM Get current page
|
FORM Get current page {( * )} -> Function result | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
Returns number of current subform page | |||||
Function result | Longint |
![]() |
Number of currently displayed form page | |||||
The FORM Get current page command returns the number of the currently displayed form page or of the current form loaded by the FORM LOAD command.
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.
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
FORM FIRST PAGE
FORM GOTO PAGE
FORM LAST PAGE
FORM NEXT PAGE
FORM PREVIOUS PAGE
Product: 4D
Theme: Forms
Number:
276
Created: < 4D v6
Renamed: 4D v12 (Current form page)
Modified: 4D v13
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)