PanelScreenGadget()

Syntax

Result = PanelScreenGadget(#ScreenGadget, x, y, Width, Height)
Description
Creates a panel gadget in the current GadgetList. Once a panel is created, its list of panels is empty.

Parameters

#ScreenGadget A number to identify the new gadget. #PB_Any can be used to auto-generate this number.
x, y, Width, Height The position and dimensions of the new gadget.

Return value

Nonzero on success, zero otherwise. If #PB_Any was used as the #ScreenGadget parameter then the return-value is the auto-generated gadget number on success.

Remarks

To add a 'mini help' to this gadget, use ScreenGadgetToolTip().

The following functions can be used to act on the gadget:

- AddScreenGadgetItem(): Add a panel.
- RemoveScreenGadgetItem(): Remove a panel.
- CountScreenGadgetItems(): Count the number of panels.
- ClearScreenGadgetItems(): Remove all panels.

- SetScreenGadgetState(): Change the active panel.
- GetScreenGadgetState(): Get the index of the current panel.
  #PB_Panel_ItemWidth : Returns the width of the inner area where the gadgets are displayed.
  #PB_Panel_ItemHeight: Returns the height of the inner area where the gadgets are displayed.
  #PB_Panel_TabHeight : Returns height of the panel tabs on top of the gadget.
You must call AddScreenGadgetItem() to add a panel before you can create other gadgets inside the panel gadget. The next gadgets will then be created automatically in the new panel. This is very convenient. When the PanelGadget item has been filled with all the needed gadgets, CloseScreenGadgetList() must be called to return to the previous GadgetList. This means that a PanelGadget can be created inside another PanelGadget.

Supported OS

All

<- OptionScreenGadget() - ScreenGadget Index - ProgressBarScreenGadget() ->