SetGadgetItemState()

Syntax

SetGadgetItemState(#Gadget, Item, State)

Description

Changes the item state of the specified #Gadget. This is a universal function which works for almost all gadgets which handle several items. 'State' can take the following values:

- ListViewGadget(): 1 if the item should be selected, 0 else.
- ListIconGadget(): 1 if the item should be selected, 0 else.
  #PB_ListIcon_Selected: The item should be selected 
  #PB_ListIcon_Checked : The item should have its checkbox checked (#PB_ListIcon_CheckBoxes flags). 
- TreeGadget(): Combination of the following values:
  1: The item should be selected. 
  2: The item should be expanded (a tree branch opened), 0 else. 
For example, if State = 3, then the item is selected and expanded.

Supported OS

Windows, AmigaOS, Linux

Gadget - Index