Class ButtonConceptMetadata

Defines properties and message types for ButtonConcept.

Property Types

See also PropertyType
ButtonConceptMetadata.IsPressedProperty

Indicates whether the button is pressed and in the down state.

ButtonConceptMetadata.LongPressIntervalProperty

Sets the amount of time in milliseconds that the user must hold the button pressed down for Kanzi to recognize it as a long-press gesture. To disable the long-press gesture, set to 0.

ButtonConceptMetadata.PressOnHoverProperty

Whether holding a finger on the device screen and moving it over the button transitions the button to the down state.

ButtonConceptMetadata.AutoClickIntervalProperty

Sets the time in milliseconds after which a button that the user keeps pressed down sends the Button: Click message. While the user holds the button down, the button keeps sending the Button: Click message at the time interval set by this property. To disable the behavior, set to 0.

ButtonConceptMetadata.ToggleStateProperty

Sets the toggle state of a Toggle Button. To update this property with a binding, use a to-source or two-way binding.

ButtonConceptMetadata.ToggleStateCountProperty

Sets the number of toggle states of a Toggle Button.

ButtonConceptMetadata.IndexInGroupProperty

Sets the index of the Toggle Button in the Toggle Button Group to which that Toggle Button is registered. If a Toggle Button does not have a local value for this property, it is not registered to the ancestor Toggle Button Group. When set to -1, the Toggle Button Group assigns an index for the Toggle Button.

Message Types

See also MessageType
ButtonConceptMetadata.ClickMessage

Occurs when a user lifts their finger on top of a Button that they previously pressed and when the time set by the Auto Press Interval property in the pressed Button expires.

Arguments: ButtonConceptMetadata.ClickedMessageArguments

ButtonConceptMetadata.DownMessage

Occurs when the user presses down the Button.

Arguments: ButtonConceptMetadata.PressedMessageArguments

ButtonConceptMetadata.CancelMessage

Occurs when a user lifts their finger outside of a Button that they previously pressed.

Arguments: ButtonConceptMetadata.CanceledMessageArguments

ButtonConceptMetadata.EnterMessage

Button: Enter trigger is set off:

  • When the user presses down the button.
  • When the user presses down the button, moves the pointer outside of the button area, and then moves the pointer back to the button area while still holding down the pointer.

Arguments: ButtonConceptMetadata.PointerEnteredMessageArguments

ButtonConceptMetadata.LeaveMessage

Button: Leave trigger is set off:

  • When the user presses down the button and then lifts the pointer.
  • When the user presses down the button and then moves the pointer outside of the button area.
  • When the user sets off a Button: Long Press trigger.

Arguments: ButtonConceptMetadata.PointerLeftMessageArguments

ButtonConceptMetadata.LongPressMessage

Occurs when the user presses down a Button and holds the Button pressed for the amount of milliseconds defined in the Hold Interval property of that Button.

Arguments: ButtonConceptMetadata.LongPressMessageArguments

ButtonConceptMetadata.ToggledOnMessage

Occurs when a Toggle Button is toggled on.

Arguments: ButtonConceptMetadata.ToggledOnMessageArguments

ButtonConceptMetadata.ToggledOffMessage

Occurs when a Toggle Button is toggled off.

Arguments: ButtonConceptMetadata.ToggledOffMessageArguments

ButtonConceptMetadata.ToggleStateMessage

Occurs when the toggle state of a Toggle Button changes.

Arguments: ButtonConceptMetadata.ToggleStateChangedMessageArguments

Message Arguments

Message arguments classes define message arguments used for different message types. Each class defines a number of property types - arguments - together with getter and setter functions for them.

ButtonConceptMetadata.CanceledMessageArguments

ButtonConceptMetadata.ClickedMessageArguments

ButtonConceptMetadata.LongPressMessageArguments

ButtonConceptMetadata.PointerEnteredMessageArguments

ButtonConceptMetadata.PointerLeftMessageArguments

ButtonConceptMetadata.PressedMessageArguments

ButtonConceptMetadata.ToggleStateChangedMessageArguments

ToggleStateProperty

Reports the toggle state of a Toggle Button.

Example
local value = arguments:getToggleStateProperty()
arguments:setToggleStateProperty(value)

ButtonConceptMetadata.ToggledOffMessageArguments

ButtonConceptMetadata.ToggledOnMessageArguments