Code: Select all
Enumeration
#Tree
#Text_0
#MinList
#Frame3D_0
#Text_1
#ExtList
#Parents
#Children
#Kill
EndEnumeration
Procedure WindowHook (window, message, wparam, lparam)
Select message
Case #WM_SIZE
ResizeGadget(#Tree, 10, 10, WindowWidth () - 170, WindowHeight () - 20)
ResizeGadget(#MinList, WindowWidth () - 140, 60, 120, 30)
ResizeGadget(#Frame3D_0, WindowWidth () - 150, 10, 140, 160)
ResizeGadget(#Text_0, WindowWidth () - 140, 40, 110, 20)
ResizeGadget(#Text_1, WindowWidth () - 140, 100, 110, 20)
ResizeGadget(#ExtList, WindowWidth () - 140, 120, 120, 30)
ResizeGadget(#Parents, WindowWidth () - 150, 190, 140, 30)
ResizeGadget(#Children, WindowWidth () - 150, 230, 140, 30)
ResizeGadget(#Kill, WindowWidth () - 150, WindowHeight () - 40, 140, 30)
EndSelect
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(0, 280, 209, 640, 480, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar , "Duplicity")
If CreateGadgetList(WindowID())
TreeGadget(#Tree, 10, 10, WindowWidth () - 170, WindowHeight () - 20, #PB_Tree_CheckBoxes)
ComboBoxGadget(#MinList, WindowWidth () - 140, 60, 120, 30, #PB_ComboBox_Editable)
Frame3DGadget(#Frame3D_0, WindowWidth () - 150, 10, 140, 160, "Find files with")
TextGadget(#Text_0, WindowWidth () - 140, 40, 110, 20, "Minimum size")
TextGadget(#Text_1, WindowWidth () - 140, 100, 110, 20, "Extension")
ComboBoxGadget(#ExtList, WindowWidth () - 140, 120, 120, 30, #PB_ComboBox_Editable)
ButtonGadget(#Parents, WindowWidth () - 150, 190, 140, 30, "Select parent items")
ButtonGadget(#Children, WindowWidth () - 150, 230, 140, 30, "Select child items")
ButtonGadget(#Kill, WindowWidth () - 150, WindowHeight () - 40, 140, 30, "Delete selected items")
EndIf
EndIf
SetWindowCallback (@WindowHook ())
Repeat
Until WaitWindowEvent () = #PB_Event_CloseWindow
Code: Select all
Procedure WindowHook (WindowID, Message, wParam, lParam)
result = #PB_ProcessPureBasicEvents
Select Message
Case #WM_SIZE
ResizeGadget (0, 0, 0, WindowWidth (), WindowHeight ())
ResizeGadget (1, WindowWidth () - 120, 20, 100, 30)
EndSelect
ProcedureReturn result
EndProcedure
OpenWindow (0, 320, 200, 320, 200, #PB_Window_SystemMenu | #PB_Window_SizeGadget, "Test")
CreateGadgetList (WindowID ())
Frame3DGadget (0, 0, 0, WindowWidth (), WindowHeight (), "Test panel")
TextGadget (1, WindowWidth () - 120, 20, 100, 30, "Hello")
SetWindowCallback (@WindowHook ())
Repeat
Until WaitWindowEvent () = #PB_Event_CloseWindow
End

