Button
Inserts a labeled push button control into the spreadsheet. Optionally, a button press can be configured to signal a spreadsheet event trigger.
- A Button control may be controlled programmatically via In-Sight Native Mode commands, using the EV SetCellValue command. Enter a 1 to press the button down, and a 0 to release the button. Ensure that the command to release the button after pressing it is sent, otherwise the button will remain as though it were pressed on.
- A button click generates two events. The state of the button changes from 0 to 1 when pressing the button down, then from 1 to 0 when releasing the button. If a button is configured to generate a soft event, the event is only triggered once on the down press of the button.
Button Inputs
Parameter | Description | ||||||
---|---|---|---|---|---|---|---|
Specifies a text string label; this name will appear on the button itself. |
|||||||
Optionally specifies a trigger signal to occur when the button is pressed.
|
Button Outputs
Returns |
A value of 1 when the button is pressed; otherwise the return value is 0. |
Results |
A labeled Button control. |
Button Example
-
Assume cells A3 and A4 are configured as follows:
A3=Button("Test",-1)
A4=Count(A3,9999999,0,0)
The spreadsheet looks like this:
-
Press the button in cell A3. Cell A4 references cell A3 to count the number of times the "Test" button is pressed. The value in cell A4 is now 1.000.