Hide a Container gadget

Just starting out? Need help? Post your questions and find answers here.
RobertRioja
User
User
Posts: 81
Joined: Thu May 02, 2019 3:57 am
Location: USA
Contact:

Hide a Container gadget

Post 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
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4953
Joined: Sun Apr 12, 2009 6:27 am

Re: Hide a Container gadget

Post 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
Egypt my love
Post Reply