resize.
In PB3.7, you must use the callback for the resize, because you get no "offical" message

Ok here it is. Also when you try to activate Window(0) "Hallo", always the subwindow(1) is activate.
Code: Select all
Procedure Callback(WindowID, Message, wParam, lParam)
Result = #PB_ProcessPureBasicEvents
Select message
Case #WM_MOUSEACTIVATE
If windowid=WindowID(0)
result=#MA_NOACTIVATEANDEAT
SetActiveWindow_(WindowID(1))
EndIf
Case #WM_ACTIVATE
If IsWindow(0)
If windowid=WindowID(0)
type=lparam&$ffff
If type=#WA_ACTIVE
SetActiveWindow_(WindowID(1))
EndIf
EndIf
EndIf
Case #WM_SIZE
If windowid=WindowID(1)
ResizeGadget(6,-1,-1,WindowWidth(1),WindowHeight(1))
EndIf
EndSelect
ProcedureReturn Result
EndProcedure
OpenWindow(3,400,200,400,400,"hallo3")
OpenWindow(0,0,200,400,400,"Hallo")
OpenWindow(1,200,200,400,400,"Hallo2",#PB_Window_SizeGadget|#PB_Window_SystemMenu,WindowID(0))
SetWindowCallback(@callback())
;ContainerGadget(1,0,0,400,200)
ButtonGadget(2,0,0,190,200,"Test1")
ButtonGadget(4,210,0,190,200,"test2")
SplitterGadget(3, 0,0, 400,200, 2,4, #PB_Splitter_Vertical|#PB_Splitter_Separator )
;CloseGadgetList()
ButtonGadget(5,0,200,400,200,"Test3")
SplitterGadget(6, 0,0,400,400, 3,5)
SetGadgetState(3,300)
Repeat
event=WaitWindowEvent()
Select event
Case #PB_Event_CloseWindow
End
EndSelect
ForEver