SG_GetGadgetState

Syntax:

Result=SG_GetGadgetState(SG_GadgetID_L.l)

Parameters:

SG_GadgetID_L

=

The number of the gadget


Return Values:

Result

=

the current state of the gadget or -1, if gadget has no state (i.e. Editorgadgets with no line marked)


Description:

This is a universal function which works for almost all gadgets:

- EditorGdget(): returns the first item which has a set state

- CheckBoxGadget(): returns #PB_ListIcon_Selected if checked, 0 otherwise.

- ListIconGadget(): returns the currently selected item index, -1 if none is selected.

- OptionGadget(): returns #PB_ListIcon_Selected if activated, 0 otherwise.

- ScrollBarGadget(): returns the current slider position.

- TrackBarGadget(): returns the current position of the TrackBar (value inside the minimum - maximum range).


Example:


Remarks:



Supported OS:   Windows