[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

The integer gadget is really a special case of the string gadget type.
Initialize the gadget as a string gadget, then set the GACT_LONGINT flag
in the gadget's Activation field.

The user interacts with an integer gadget using exactly the same rules as
for a string gadget, but Intuition filters the input, allows the user to
enter only a plus or minus sign and digits.  The integer gadget returns a
signed 32-bit integer in the StringInfo variable LongInt.

To initialize an integer gadget to a value, preload the input buffer with
an ASCII representation of the initial integer. It is not sufficient to
initialize the gadget by merely setting a value in the LongInt variable.

Integer gadgets have the LongInt value updated whenever the ASCII contents
of the gadget changes, and again when the gadget is deactivated.


[Back to Amiga Developer Docs]