Single function bringToSecond
:
move window (tForm
) to the SECOND position
in the Z-Order list of application windows.
Z-Index
T0P Wnd00 +-> Wnd_A Wnd_A
1 Wnd01 | Wnd00 +---> Wnd_B
2 ... | Wnd01 | Wnd00
3 ... | ... | Wnd01
... ... | ... |
N Wnd_A.bringToFront-^ ... |
M ... bringToSecond(Wnd_B)---^
... ... ...
...............................................................
DeskTop DeskTop DeskTop DeskTop DeskTop DeskTop DeskTop DeskTop
in0k_bringToSecondPlane.pas
generalized version. If possible, use a native implementation for the target platform. If there is no implementation, it is a cross-platform version.in0k_bringToSecondPlane_LazLCL.pas
cross-platform version- the functionality of the
bringToSecond
procedure is achieved by two consecutive calls to the standardtForm.bringToFront
- 💩 periodically noticeable characteristic flickering of the interface. 👍 should work on ALL platforms
- the functionality of the
bringToSecond_WIN.pas
use functions WinAPIbringToSecond_X11.pas
use functions xlibbringToSecond_GtkX.pas
use functions GtkbringToSecond_QtX.pas
use functions Qt
win32/64 | x11/xlib | GTK2 | GTK3 | Qt4 | Qt5 | |
---|---|---|---|---|---|---|
.._LCL.pas |
[::] | [::] | [::] | [::] | [::] | [::] |
.._WIN.pas |
[+] | [+] | [#] | [+] | ||
.._X11.pas |
[+] | [+] | [+] | |||
.._GtkX.pas |
[~1] | [+] | [+] | |||
.._QtX.pas |
[~2] | [~3] | [~3] |
[::]
- should work EVERYWHERE, where there is Lazarus[+]
- implemented, tested[#]
- implemented, NOT tested[~1]
- usedgdk_window_restack
INCORRECT works underWINDOWS
, the implementation is similar toLCL
but withGTK
methods ( [+] GTK2; [#] GTK3 ).[~2]
- the necessary methods do not EXIST, the implementation is similar toLCL
but withQt
methods ( [#] Qt4; [+] Qt5 ).[~3]
- the necessary methods do not EXIST, the implementation is similar toLCL
but withQt
methods ( [+] Qt4; [+] Qt5 ).
-
Place the source code of the library into the folder
%SomeDIR%
(clone the repository or download the latest version). -
In the project settings, specify the folder
%SomeDIR%
in other unit files. -
Using in code:
uses ... uBringToSecond, ...; .. bringToSecond(myForm); ..
For a ready-to-study example, see in repository of demo project.