Skip to end of metadata
Go to start of metadata
General

Component Palette Icon:


Description

The One-Shot Button is designed to send of a write, and wait for a response, disabling the button until something resets the 'value' property on the component. 

When the 'value' property and the 'setValue' property are equal, the component transitions to the writing state. Once 'value' and 'setValue' are no longer equal, the button returns the the a ready state. 

This feature is new in Ignition version 8.1.2
Click here to check out the other new features

The One-Shot Button component has three pre-configured variants:

  • Primary - Default design of the button.
  • Secondary - A secondary design for the button.
  • Require Confirm - Default design of the button but requires confirmation from user before action is submitted.  
Properties

Most Properties have binding options. For more information on Bindings, see Types of Bindings in Perspective.
This section only documents the Props Category of properties. The other Categories are described on the Perspective Component Properties page.

NameDescriptionProperty Type
value

The current value displayed on the component. Should be bound bi-directionally to a Tag. Default is 0.

This feature is new in Ignition version 8.1.4
Click here to check out the other new features

As of 8.1.4 the property type for value can be numeric, boolean, string, or null.

value:  numeric, boolean, string, or null.


setValue

The value to set when the button is pushed. Default is 1.

This feature is new in Ignition version 8.1.4
Click here to check out the other new features

As of 8.1.4 the property type for setValue can be numeric, boolean, string, or null.

value:  numeric, boolean, string, or null.


primaryToggle between the default primary and secondary button style. Default is true.value: boolean
enabled

Whether the user can interact with the One-Shot Button. If disabled, the component cannot be used. Default is true.

Note: If the component is disabled, scripts can still run on the component. For example, if you add a script action to the onClick event, the script will fire when the user clicks on the One-Shot Button.

value: boolean
readyState

Displays the readyState value on the component.

 Click to see the readyState properties...
NameDescriptionProperty Type
textThe text of the button while it's value is not being written.value: string
styleModify readyState style using the style properties. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object
icon

The Icon is an image path used to augment the readyState of the component by placing an image next to it.

NameDescriptionProperty Type
pathShorthand path to icon source, in format: library/IconName. The materials icon library is a the primary source for icons, see https://fonts.google.com/icons?selected=Material+Icons.value: string
colorColor of the icon. Can also assign color in "fill" of the style property. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
styleModify the readyState style using the style properties. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object
object
object
writingState

Displays the writingState value on the component.

 Click to see writingState properties
NameDescriptionProperty Type
textThe text of the button while its value is being written. Default is "Writing...".value: string
styleModify the writingState style using the style properties. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object
icon

An image path used to augment the writingState of the component by placing an image next to it.

NameDescriptionProperty Type
pathShorthand path to icon source, in format: library/IconName. The materials icon library is a the primary source for icons, see https://fonts.google.com/icons?selected=Material+Icons.value: string
colorColor of the icon. Can also assign color in "fill" of the style property. Can be chosen from color wheel, chosen from color palette, or entered as RGB or HSL value. See Color Selector.color
styleModify icon style using the style properties. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object
object
object
confirm

If enabled, a message that asks the user to approve the requested operation.

 Click to see the confirm properties
NameDescriptionProperty Type
enabledIf true, a confirmation box will be shown. Default is false.value: boolean
textMessage to show user if confirmation is enabled. Default is "Are you sure?"value: string
object
styleSets a style for this component. Full menu of style options is available for text, background, margin and padding, border, shape and miscellaneous. You can also specify a style class.object

Perspective Component Events
The Perspective Event Types Reference page describes all the possible component event types for Perspective components. Not all component events support each Perspective component. The Component Events and Actions page shows how to configure events and actions on a Perspective component. Component scripting is handled separately and can be accessed from the Component menubar or by right clicking on the component.

Example

PropertyValueStyle Category
props.readyState.textStart ProcessN/A
props.readyState.icon.pathmaterial/trending_flatN/A
props.readyState.icon.color#008000N/A
props.writingState.textStartingN/A
props.writingState.style.backgroundColor#8AFF8Abackground


  • No labels