SplitterGadget issue if #PB_Splitter_SecondFixed used

Found an issue in SpiderBasic ? Please report it here !
blz
Posts: 7
Joined: Wed Apr 14, 2021 12:40 pm

SplitterGadget issue if #PB_Splitter_SecondFixed used

Post by blz »

Hi all,

It seems SplitterGadget doesn't work as it should if #PB_Splitter_SecondFixed is used.
Please see the example code below.

Code: Select all

Enumeration
  #Button1
  #Button2
  #Splitter
EndEnumeration

If OpenWindow(0, 0, 0, 400, 300, "SplitterGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)  ; | #PB_Window_SizeGadget)
  ButtonGadget(#Button1, 0, 0, 0, 0, "Button 1") ; No need to specify size or coordinates
  ButtonGadget(#Button2, 0, 0, 0, 0, "Button 2") ; as they will be sized automatically
  
  ; ****** Three versions for SplitterGadget creation. Just comment/uncomment the necessary line to see the difference in behaviour ******
  SplitterGadget(#Splitter, 5, 5, 390, 290, #Button1, #Button2, #PB_Splitter_Separator)                             ;  -> OK
  ;SplitterGadget(#Splitter, 5, 5, 390, 290, #Button1, #Button2, #PB_Splitter_Separator | #PB_Splitter_FirstFixed)   ;  -> OK
  ;SplitterGadget(#Splitter, 5, 5, 390, 290, #Button1, #Button2, #PB_Splitter_Separator | #PB_Splitter_SecondFixed)  ;  -> makes the second gadget "minimized" + SetGadgetState() has no effect
  
  SetGadgetState(#Splitter, 50)  ; doesn't work as expected if SplitterGadget was created with #PB_Splitter_SecondFixed
EndIf
Can this be looked into please?

Many thanks,