Welcome to Pauls PureProject
 Home Online Reference Guide duplicated from http://cvs.purebasic.com  
 Online Resources
   · Reference

 Libraries
     2DDrawing
     Billboard
     Camera
     CDAudio
     Cipher
     Clipboard
     Console
     Database
     Date
     Desktop
     Engine3D
     Entity
     File
     FileSystem
     Font
     Gadget
     Help
     Image
     ImagePlugin
     Joystick
     Keyboard
     Library
     Light
     LinkedList
     Material
     Math
     Memory
     Menu
     Mesh
     Misc
     Module
     Mouse
     Movie
     Network
     OnError
     Packer
     Palette
     Particle
     Preference
     Printer
     Requester
     Sort
     Sound
     SoundPlugin
     Sprite
     Sprite3D
     StatusBar
     String
     SysTray
     Terrain
     Texture
     Thread
     Toolbar
     Window

 PanelGadget

Syntax

Result = PanelGadget(#Gadget, x, y, Width, Height)
Description
Creates a Panel gadget in the current GadgetList. If #PB_Any is used as '#Gadget' parameter, the new gadget identifier will be returned as 'Result'. Once a Panel is created, its list of panels is empty.

You can add a 'mini help' to this gadget by using GadgetToolTip().

The following commands can be used to act on the list content:

- AddGadgetItem(): Add a panel.
- RemoveGadgetItem(): Remove a panel.
- CountGadgetItems(): Count the number of panels.
- ClearGadgetItemList(): Remove all panels.
- GetGadgetItemText(): Retrieve the text of the specified item.
- SetGadgetItemText(): Change the text of the specified item.

- SetGadgetState(): Change the active panel.
- GetGadgetState(): Get the index of the current panel.

You must call AddGadgetItem() 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, CloseGadgetList() must be called to return to the previous GadgetList. This means that a PanelGadget can be created inside another PanelGadget...

Example:
  ; Shows using of several panels...
  If OpenWindow(0,0,0,322,220,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"PanelGadget") And CreateGadgetList(WindowID(0))
    PanelGadget     (0,8,8,306,203)
      AddGadgetItem (0,-1,"Panel 1")
        PanelGadget (1,5,5,290,166)
          AddGadgetItem(1,-1,"Sub-Panel 1")
          AddGadgetItem(1,-1,"Sub-Panel 2")
          AddGadgetItem(1,-1,"Sub-Panel 3")
        CloseGadgetList()
      AddGadgetItem (0,-1,"Panel 2")
        ButtonGadget(2, 10, 15, 80, 24,"Button 1")
        ButtonGadget(3, 95, 15, 80, 24,"Button 2")
    CloseGadgetList()
    Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
  EndIf

Supported OS

Windows, Linux

<- OptionGadget() - Gadget Index - ProgressBarGadget() ->



Hosted by Reel Media Productions Copyright©2001-2004 All Rights Reserved