Page 1 of 1

Hide a Container gadget

Posted: Sun Aug 10, 2025 9:40 pm
by RobertRioja
I can hide or disable a Container gadget, but the controls in the container are not hidden nor disabled. Is there a way to hide/disable everything inside the container?

Thanks,
Robert

Re: Hide a Container gadget

Posted: Sun Aug 10, 2025 10:05 pm
by RASHAD
Hi
Can you post a workable snippet because HideGadget(?,1) work as expected ?
PB 6.21 x64 win 11 x64

Code: Select all

  If OpenWindow(0, 0, 0, 322, 150, "ContainerGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ContainerGadget(0, 8, 8, 306, 133, #PB_Container_Raised)
      ButtonGadget(1, 10, 15, 80, 24, "Button 1")
      ButtonGadget(2, 95, 15, 80, 24, "Button 2")
    CloseGadgetList()
    HideGadget(0,1)
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf