Buttons
Overview
Button is to perform a specific action in response to a click from the user.
- Button
- Image Button
Properties
Property | Description |
---|---|
Push Event | Whether to trigger event after pressing the control. |
Normal Image | Set the images of the control in the normal state. |
Push Image | Set the images of the control in the pressed state. |
Events
Callback Name | Callback Function |
---|---|
on_click | The callback of left-click. |
on_left_double_click | The callback of double left-click. |
on_right_click | The 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