SG_ButtonImageGadget

Syntax:

Result=SG_ButtonImageGadget(SG_GadgetID_L.l, X_Pos_L.l, Y_Pos_L.l, Width_L.l, Height_L.l, ImageID_L.l, [Flags_L.l])

Parameters:

SG_GadgetID_L

=

The number of the gadget

X_Pos_L

=

the x-position of the gadget

Y_Pos_L

=

the y position of the gadget

Width_L

=

the width of the gadget

Height_L

=

the height of the gadget

ImageID_L

=

the image ID for the buttongadget

[Flags_L]

=

'Flags' are always optional and can be composed of one or several (using the bitwise OR operator '|') of the following constants:

#PB_Button_Toggle : Creates a toggle button: one click pushes it, another releases it

=

the state of a Toggle-Image button can be returned with SG_GetGadgetToggleState() and set with SG_SetGadgetToggleState()

=


Return Values:

Result

=

contains a pointer to the internal gadget structur. See the source of this lib for more information


Description:

Create a button gadget in the current GadgetList. SG_GadgetID_L will be the number returned by SG_EventGadgetID() command. The ImageID represents a Image file and can be obtained by using UseImage() or ImageID() from the Image library.

- SG_SetGadgetState() can be used to change the current image of the gadget. A valid ImageID can be easily got with the UseImage() or ImageID() commands.


Example:


Remarks:

The image will be resized to fit the button. This can take a while with big images.



Supported OS:   Windows