Splitter separate and event resizing [Resolved]
Posted: Sun Dec 28, 2025 9:56 pm
Hello at all
Someone understand why when i resize the splitter separate to the left or right the event is not detected
Have a good day
Someone understand why when i resize the splitter separate to the left or right the event is not detected
Code: Select all
Enumeration
#FormProgram
#Splitter
#Panel
#Editor
#Container
EndEnumeration
Procedure WindowProc(hWnd,Msg,wParam,lParam)
result = #PB_ProcessPureBasicEvents
If Msg = #WM_SIZE And hWnd = GadgetID(#Container)
Debug "Event #Container"
result = 0
EndIf
If Msg = #WM_SIZE And HWnd = GadgetID(#Splitter)
Debug "Event #Splitter"
result = 0
EndIf
ProcedureReturn result
EndProcedure
OpenWindow(#FormProgram,0,0, 600, 300,"Split",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_TitleBar)
EditorGadget(#Editor, 0,0, WindowWidth(#FormProgram), WindowHeight(#FormProgram))
PanelGadget(#Panel, 0, 0, WindowWidth(#FormProgram), WindowHeight(#FormProgram))
AddGadgetItem(#Panel, -1, "Panel")
ContainerGadget(#Container,0,0,WindowWidth(#FormProgram),WindowHeight(#FormProgram))
CloseGadgetList()
SetWindowLongPtr_(GadgetID(#Container), #GWL_STYLE, GetWindowLongPtr_(GadgetID(#Container), #GWL_STYLE)|#WS_CLIPCHILDREN) ; <- important
CloseGadgetList()
SplitterGadget(#Splitter, 0, 0, WindowWidth(#FormProgram), WindowHeight(#FormProgram), #Panel, #Editor, #PB_Splitter_Vertical|#PB_Splitter_Separator)
SetGadgetState(#Splitter, WindowWidth(#FormProgram) / 4)
SetWindowCallback(@WindowProc())
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow




