ContainerGadget()

Syntax

ContainerGadget(#Gadget, x, y, Width, Height [, Flags])
Description
Creates a container gadget in the current GadgetList. If #PB_Any is used as '#Gadget' parameter, the new gadget identifier will be returned as 'Result'. It's a simple panel gadget which can contain other gadgets. Once the gadget is created, all future created gadgets will be created inside the container. When all the needed gadgets have been created, CloseGadgetList() must be called to return to the previous GadgetList. OpenGadgetList() can be used later to add others gadgets on the fly in the container area.

'Flags' are optional and can be composed of one of the following constants:
  #PB_Container_BorderLess : Without any border (Default).
  #PB_Container_Flat       : Flat frame.
  #PB_Container_Raised     : Raised frame.
  #PB_Container_Single     : Single sunken frame.
  #PB_Container_Double     : Double sunken frame.
You can add a 'mini help' to this gadget by using GadgetToolTip().

Example:
  If OpenWindow(0,0,0,322,150,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"ContainerGadget") And CreateGadgetList(WindowID(0)) 
    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() 
    Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow 
  EndIf 

Supported OS

Windows, Linux, MacOS X

<- ComboBoxGadget() - Gadget Index - CountGadgetItems() ->