A real child window exist only inside the client region of it's parent.
How ever I searched the forum and found more than 50 times SetParent_ the WINDOWS API command
but nothing about Linux. (or I'm blind)
here are how you can do it with Linux too
DJ.
Code: Select all
; put child window in client region of a parent window
EnableExplicit
Procedure SetParent(Child.i, Parent.i)
If IsWindow(Child)=0
Child=WindowID(Child)
If Child=#Null
MessageRequester("error:","SetParent() wrong child param !"):End
EndIf
EndIf
If IsWindow(Parent)=0
Parent=WindowID(Parent)
If Parent=#Null
MessageRequester("error:","SetParent() wrong parent param !"):End
EndIf
EndIf
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
SetParent_(Child,Parent)
CompilerCase #PB_OS_Linux
Protected *childWidget.GtkWidget = Child
Protected *parentWidget.GtkWidget = Parent
gdk_window_reparent_(*childWidget\Window, *parentWidget\Window, 0, 0)
CompilerCase #PB_OS_MacOS
Debug "No solution for MacOS yet !"
CompilerEndSelect
EndProcedure
Linux:
Windows: