Multiple splitters are not displayed correctly

You need some new stunning features ? Tell us here.
Rinzwind
Enthusiast
Enthusiast
Posts: 636
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Multiple splitters are not displayed correctly

Post by Rinzwind »

When designing everything goes OK, until swithing to code and back. Then display does not match end result (when run) anymore...

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 Window_2

Global Editor_0, Editor_0_Copy1, Splitter_0, Editor_0_Copy2, Splitter_1


Procedure OpenWindow_2(x = 0, y = 0, width = 416, height = 336)
  Window_2 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu)
  Editor_0 = EditorGadget(#PB_Any, 8, 12, 312, 102)
  Editor_0_Copy1 = EditorGadget(#PB_Any, 8, 123, 312, 41)
  Splitter_0 = SplitterGadget(#PB_Any, 8, 12, 312, 152, Editor_0, Editor_0_Copy1)
  SetGadgetState(Splitter_0, 102)
  Editor_0_Copy2 = EditorGadget(#PB_Any, 8, 173, 312, 143)
  Splitter_1 = SplitterGadget(#PB_Any, 8, 12, 312, 304, Splitter_0, Editor_0_Copy2)
  SetGadgetState(Splitter_1, 152)
EndProcedure

Procedure Window_2_Events(event)
  Select event
    Case #PB_Event_CloseWindow
      ProcedureReturn #False

    Case #PB_Event_Menu
      Select EventMenu()
      EndSelect

    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
  EndSelect
  ProcedureReturn #True
EndProcedure

Fix seems to be to move the line Editor_0_Copy2 = EditorGadget(#PB_Any, 8, 173, 312, 143) above the splitters...
Rinzwind
Enthusiast
Enthusiast
Posts: 636
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: Multiple splitters are not displayed correctly

Post by Rinzwind »

But add containers to those splitters and things become quite 'unstable' in the designer
Post Reply