Skip to main content

Picture

Overview​

Picture control is to save images. Assign the image's path to the control and it will show the corresponding image.

Properties​

PropertyDescription
ImageDisplay the corresponding image after filling its path.
Auto SizeDisplay the image in its original resolution without scaling.
Hint TextDisplay the hint text when the mouse is hovering over the control.

Events​

Callback NameCallback Function
on_left_downThe callback when the left mouse button is pressed.
on_left_upThe callback when the left mouse button is released.
on_double_clickThe callback when the left mouse button is double-clicked.

Lua Script Example​

self.Text = "Edit"
self.Image = nx_widestr(".\\picture.png")

function on_double_click(self)
local str=nx_string(self.Image)
nx_msgbox(str)
end