Skip to main content

Button

Button is to perform a specific action in response to a click from the user.

  • Button

button

  • Image Button

button1

Properties

PropertyDescription
Push EventWhether to trigger event after pressing the control.
Normal ImageSet the images of the control in the normal state.
Push ImageSet the images of the control in the pressed state.

Events

addCallBack1

Callback NameCallback Function
on_clickThe callback of left-click.
on_left_double_clickThe callback of double left-click.
on_right_clickThe callback of double right-click.

Lua Script Example

self.PushEvent = true
self.NormalImage = "Rotate Left icon.png"
self.PushImage = "Rotate Right icon.png"

-- Left-click on the button to execute the callback function of the on_click
function Button_click(self)
nx_msgbox("Button_click")
end