Sorry Tinman, I still don't get what you want.
About your Ok/Cancel example, have a look at the codes below :
Example 1
Code: Select all
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_Cancel
#Button_Ok
EndEnumeration
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 450, 200, 195, 165, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
If CreateGadgetList(WindowID(#Window_0))
ButtonGadget(#Button_Cancel, 0, 135, 65, 30, "Cancel")
ButtonGadget(#Button_Ok, 130, 135, 65, 30, "Ok")
PureRESIZE_SetGadgetResize(#Button_Cancel, 1, 0, 0, 1)
PureRESIZE_SetGadgetResize(#Button_Ok, 0, 0, 1, 0)
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Select EventWindow()
Case #Window_0
CloseWindow(#Window_0)
Break
EndSelect
EndSelect
Forever
Example 2
Code: Select all
Enumeration
#Window_0
EndEnumeration
Enumeration
#Button_Cancel
#Button_Ok
EndEnumeration
Procedure OpenWindow_Window_0()
If OpenWindow(#Window_0, 450, 200, 195, 165, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
If CreateGadgetList(WindowID(#Window_0))
ButtonGadget(#Button_Cancel, 60, 135, 65, 30, "Cancel")
ButtonGadget(#Button_Ok, 130, 135, 65, 30, "Ok")
PureRESIZE_SetGadgetResize(#Button_Cancel, 0, 0, 1, 0)
PureRESIZE_SetGadgetResize(#Button_Ok, 0, 0, 1, 0)
EndIf
EndIf
EndProcedure
OpenWindow_Window_0()
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Select EventWindow()
Case #Window_0
CloseWindow(#Window_0)
Break
EndSelect
EndSelect
ForEver
Both look good to me. How should the buttons move when the window is resized ?