ok, without some code this seems to be a little hard to understand.
I have a Window with a SplitterGadget. First Gadget in there is a ScrollAreaGadget and second Gadget is a ListIconGadget.
I now want the SplitterGadget to expand to the size of the windows when it is resizing. This works fine when i run the form inside the ide. But when i run den main.pb which includes the SplitterWindow, the ResizeEvent seem not to work.
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.
;
Enumeration FormWindow
#SplitterWnd
EndEnumeration
Enumeration FormGadget
#ScrollArea_0
#String_1
#Text_1
#String_2
#Text_2
#String_3
#Text_3
#String_4
#Text_4
#String_5
#Text_5
#String_6
#Text_6
#String_7
#Text_7
#String_8
#Text_8
#String_9
#Text_9
#String_10
#Text_10
#ListIcon_0
#Splitter_1
EndEnumeration
Enumeration FormMenu
#Toolbar_0
EndEnumeration
Enumeration FormImage
#Img_SplitterWnd_0
EndEnumeration
UsePNGImageDecoder()
LoadImage(#Img_SplitterWnd_0,"/Users/michael/Entwicklung/Xojo/uniformis/publish/UniFormis-Icons/toolbar/plus_32.png")
Declare ResizeGadgetsSplitterWnd()
Procedure OpenSplitterWnd(x = 0, y = 0, width = 1140, height = 560)
OpenWindow(#SplitterWnd, x, y, width, height, "", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)
CreateToolBar(0, WindowID(#SplitterWnd))
ToolBarImageButton(#Toolbar_0,ImageID(#Img_SplitterWnd_0))
CreateStatusBar(0, WindowID(#SplitterWnd))
AddStatusBarField(50)
StatusBarText(0, 0, "Status")
ScrollAreaGadget(#ScrollArea_0, 0, ToolBarHeight(0) + 0, 263, 536, 250, 536, 1)
StringGadget(#String_1, 10, 30, 230, 20, "1")
TextGadget(#Text_1, 10, 10, 230, 20, "1")
StringGadget(#String_2, 10, 80, 230, 20, "2")
TextGadget(#Text_2, 10, 60, 230, 20, "2")
StringGadget(#String_3, 10, 130, 230, 20, "3")
TextGadget(#Text_3, 10, 110, 230, 20, "3")
StringGadget(#String_4, 10, 180, 230, 20, "4")
TextGadget(#Text_4, 10, 160, 230, 20, "4")
StringGadget(#String_5, 10, 230, 230, 20, "5")
TextGadget(#Text_5, 10, 210, 230, 20, "5")
StringGadget(#String_6, 10, 280, 230, 20, "6")
TextGadget(#Text_6, 10, 260, 230, 20, "6")
StringGadget(#String_7, 10, 330, 230, 20, "7")
TextGadget(#Text_7, 10, 310, 230, 20, "7")
StringGadget(#String_8, 10, 380, 230, 20, "8")
TextGadget(#Text_8, 10, 360, 230, 20, "8")
StringGadget(#String_9, 10, 430, 230, 20, "9")
TextGadget(#Text_9, 10, 410, 230, 20, "9")
StringGadget(#String_10, 10, 480, 230, 20, "10")
TextGadget(#Text_10, 10, 460, 230, 20, "10")
CloseGadgetList()
ListIconGadget(#ListIcon_0, 275, ToolBarHeight(0) + 0, 865, 536, "Column 1", 100)
SplitterGadget(#Splitter_1, 0, ToolBarHeight(0) + 0, 1140, 536, #ScrollArea_0, #ListIcon_0, #PB_Splitter_Vertical)
SetGadgetState(#Splitter_1, 263)
EndProcedure
Procedure ResizeGadgetsSplitterWnd()
Protected FormWindowWidth, FormWindowHeight
FormWindowWidth = WindowWidth(#SplitterWnd)
FormWindowHeight = WindowHeight(#SplitterWnd)
ResizeGadget(#Splitter_1, 0, ToolBarHeight(0) + 0, FormWindowWidth - 0, FormWindowHeight - ToolBarHeight(0) - StatusBarHeight(0) - 0)
EndProcedure
Procedure SplitterWnd_Events(event)
Select event
Case #PB_Event_SizeWindow
ResizeGadgetsSplitterWnd()
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Menu
Select EventMenu()
Case #Toolbar_0
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
EndSelect
EndSelect
ProcedureReturn #True
EndProcedure