4D v16.3Open form window |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
Open form window
Open form window
The Open form window command opens a new window using the size and resizing properties of the form formName. Note that formName is not displayed in the window. If you want to display the form, you have to call a command which loads a form (ADD RECORD for example). Unlike the Open window command, no method is associated to the window's close box. Clicking on this close box cancels and closes the window, except if the On Close Box form event has been activated for the form. In this case, the code associated with the On Close Box event will be executed. If formName is resizable, the window opened will contain a zoom box as well as a grow box. Note: To know the main properties of a form, use the FORM GET PROPERTIES command. The optional type parameter allows you to specify a type for the window. You must pass one of the following predefined constants (placed in the Open Form Window theme):
Notes:
By default, if the type parameter is not passed, a window of the Plain form window type is opened. Close box Size control Note: Some attributes (grow box, close box...) of the window created depend on the interface specifications of the operating system for the chosen type. It is therefore possible to obtain different results depending on the platform used. The optional parameter hPos allows you to define the horizontal position of the window. You can pass a defined position to this parameter (distance in pixels from the left edge of the application window to the left internal edge of the window) or one of the following predefined constants placed in the Open Form Window theme:
The optional parameter vPos allows you to define the vertical position of the window. You can pass a defined position to this parameter (distance in pixels from the top of the application window to the top internal edge of the window) or one of the following predefined constants placed in the Open Form Window theme:
These parameters take into account the presence of the tool bar and menu bar as well as the current size of the application's window (on Windows). If you pass the optional parameter *, the current position and size of the window are memorized when closed. When the window is reopened again, its previous position and size are respected. In this case, the vPos and hPos parameters are only used the first time the window is opened. Note: To reopen a window at vPos and hPos initial coordinates when the * parameter is used, hold down the Shift key while the window is being opened. The following statement opens a standard window with a close box and automatically adjusts it to be the same size as the "Input" form. The form window size is not set to "fixed", then the window also has a grow and a zoom box: $winRef :=Open form window([Table1];"Enter") The following statement opens a floating palette in the upper left portion of the screen based on a project form named "Tools". This palette uses the last position it was in when the user closed it each time it is reopened: $winRef :=Open form window("Tools";Palette form window;On the left;At the top;*) This code must be called on macOS while a document window is displayed, for example from a form button, to display a sheet window: $myWin:=Open form window("sheet form";Sheet form window)
See also
|
PROPERTIES
Product: 4D
HISTORY
Modified: 4D v11 SQL ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||