Ive discovered its not the resize that's the issue, it appears to be the way I have or haven't used closegadgetlist(), if I move this just after the scroll area gadget, the buttons move with the resize and are able to be clicked, however the scroll area objects no longer scroll with the area. This suggests they haven't been added to this scroll area gadget correctly.
Since that I created a container panel for my header at the top of the window, added the gadgets, and closed the list, then I open a scroll area gadget, add gadgets to this and then close the list. But Im still getting the same issue, buttons can't be clicked.
Frustratingly if I manually move the closegadgetlist() in the FormDesigner mock up to include the button, although it now scrolls, it too has the same issue, button can't be clicked on resize. Full code below:
Code: Select all
;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;
Global windowTest
Global editTitle, editDescription, textTitle, textDescription, Frame_0, ScrollArea_0, Button_0
Enumeration FormFont
#Font_windowTest_0
#Font_windowTest_1
#Font_windowTest_2
EndEnumeration
LoadFont(#Font_windowTest_0,"Arial Narrow", 18, #PB_Font_Bold)
LoadFont(#Font_windowTest_1,"Arial Narrow", 16)
LoadFont(#Font_windowTest_2,"Arial Narrow", 13)
Declare ResizeGadgetswindowTest()
Procedure OpenwindowTest(x = 0, y = 0, width = 1290, height = 830)
windowTest = OpenWindow(#PB_Any, x, y, width, height, "Test", #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_WindowCentered)
editTitle = EditorGadget(#PB_Any, 10, 30, 390, 25)
SetGadgetFont(editTitle, FontID(#Font_windowTest_0))
editDescription = EditorGadget(#PB_Any, 10, 110, 1250, 40, #PB_Editor_WordWrap)
SetGadgetFont(editDescription, FontID(#Font_windowTest_1))
textTitle = TextGadget(#PB_Any, 10, 10, 110, 20, "Title")
SetGadgetFont(textTitle, FontID(#Font_windowTest_2))
textDescription = TextGadget(#PB_Any, 10, 90, 110, 20, "Description")
SetGadgetFont(textDescription, FontID(#Font_windowTest_2))
Frame_0 = FrameGadget(#PB_Any, 750, 60, 10, 10, "")
ScrollArea_0 = ScrollAreaGadget(#PB_Any, 0, 160, 1290, 670, 1490, 880, 1)
Button_0 = ButtonGadget(#PB_Any, 1170, 180, 100, 25, "")
CloseGadgetList()
EndProcedure
Procedure ResizeGadgetswindowTest()
Protected FormWindowWidth, FormWindowHeight
FormWindowWidth = WindowWidth(windowTest)
FormWindowHeight = WindowHeight(windowTest)
ResizeGadget(editDescription, 10, 110, FormWindowWidth - 40, 40)
ResizeGadget(ScrollArea_0, 0, 160, FormWindowWidth - 0, FormWindowHeight - 160)
ResizeGadget(Button_0, GadgetWidth(ScrollArea_0) - 120, 180, 100, 25)
EndProcedure