4D v15Toolbar form windows |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v15
Toolbar form windows
|
Open form window ( {aTable ;} formName {; type {; hPos {; vPos {; *}}}} ) -> Function result |
||
The Open form window command can now create form windows of the Toolbar type.
A new constant has been added to the "Open Form Window" theme and can be used as the type parameter:
Constant | Type | Value |
Toolbar form window | Longint | 35 |
When the Toolbar form window constant is passed, the window is created with the location, size and graphical properties of a toolbar, i.e.:
It is not possible to create two different toolbar windows at the same time. If Open form window is called with the Toolbar form window type while a toolbar window already exists, an error -10613 ("Cannot create two form windows of type toolbar") is generated.
Note about Toolbar form windows and OS X full screen mode: If your application displays both a toolbar window and standard windows that support full screen mode (Has full screen mode Mac option), interface rules require that you hide the toolbar when a standard window enters full screen mode. To know if a window has switched to full screen mode, just test whether its vertical size is exactly the same as the screen's height (see below).
Theme: Windows (command moved from "User interface")
Tool bar height -> Function result
|
||||||||||
This command now also works with custom toolbars created by the Open form window command using the Toolbar form window type.
This command returns the height of the current visible toolbar, expressed in pixels. It can be either the 4D Design mode toolbar, or a toolbar created by Open form window, depending on the context (the Design mode toolbar is automatically hidden if a custom toolbar created by Open form window is displayed).
If the toolbar is hidden, the command returns 0.
Theme: Windows (commands moved from "User interface")
SHOW TOOL BAR
|
||
These commands are no longer deprecated in 4D: they can now be used to handle custom toolbar form windows created with the Open form window command for the current process.
On OS X, you have defined a custom toolbar form window and standard windows that have the Has full screen mode Mac option. When a standard window is maximized by a user while the toolbar window is displayed, you do not want the maximized window to be overlapped by the toolbar.
To prevent this, in the "On Resize" form event of the standard window, you need to detect when the window has entered full screen mode and then call HIDE TOOL BAR:
Case of
:(Form event=On Resize)
GET WINDOW RECT($left;$top;$right;$bottom)
If(Screen height=($bottom-$top))
HIDE TOOL BAR
Else
SHOW TOOL BAR
End if
End case
The following constants related to Mac OS toolbar button support are now prefixed with _O_, since the corresponding option has been deprecated by Apple since OS X 10.6:
Product: 4D
Theme: Language
4D v15 - Upgrade (standard edition) ( 4D v15)