Radiobutton:onClick()event


This event is fired when the user has clicked on the Radiobutton.

Return value

The event returns no value.

Example

--! luart-extensions import ui -- create a simple window local win = ui.Window("Radiobutton.onClick() sample", 200, 100) local radiobutton = ui.Radiobutton(win, "Check Me !", 66, 30) -- Radiobutton onClick event function radiobutton:onClick() self.checked = not self.checked win:status("Your choice : "..(self.checked and "checked" or "unchecked")) end -- shows the window win:show() -- update status radiobutton:onClick() -- update user interface repeat ui.update() until not win.visible