SetGadgetState()

Syntax

SetGadgetState(#Gadget, State)
Description
Change the current state of the specified #Gadget. This is a universal function which works for almost all gadgets:

- ButtonImageGadget(): change the current image of the gadget.
- CalendarGadget(): set the currently selected date.
- CheckBoxGadget(): 1 to check it, 0 otherwise.
- ComboBoxGadget(): change the currently selected item.
- DateGadget(): set the currently displayed date/time. If #PB_Date_CheckBox was used, set 'State' to 0 to uncheck the checkbox.
- ImageGadget(): change the current image of the gadget.
- IPAddressGadget(): change the current IP address.
- ListIconGadget(): change the currently selected item. If -1 is specified, all items will be deselected.
- ListViewGadget(): change the currently selected item. . If -1 is specified, it will remove the selection.
- MDIGadget(): Change the currently focused childwindow (by giving the related #Window number), or use one of the following values:
  #PB_MDI_Cascade         : Cascade the child windows
  #PB_MDI_TileVertically  : Tile the childwindows vertically
  #PB_MDI_TileHorizontally: Tile the childwindows horizontally
  #PB_MDI_Next            : Give focus to the next childwindow
  #PB_MDI_Previous        : Give focus to the previous childwindow
  #PB_MDI_Arrange         : Arrange the iconic (minimized) windows
- OptionGadget(): 1 to activate it, 0 otherwise.
- PanelGadget(): change the current panel.
- ProgressBarGadget(): change progress bar value.
- ScrollBarGadget(): change the current slider position.
- SpinGadget(): change the current value.
- SplitterGadget(): change the current splitter position, in pixels.
- TrackBarGadget(): change the current cursor position.
- TreeGadget(): change the currently selected item, -1 selects no item.
- WebGadget(): perform some action on the gadget. See WebGadget for further descriptions.

Note: Please take a look at the notes in the chapter Windows Message Handling about the message handling on Windows.

Supported OS

All

<- SetGadgetItemText() - Gadget Index - SetGadgetText() ->