Radiobutton:hide() method


Hide and deactivate the Radiobutton (events can no longer be fired).

Return value

This function returns no value.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("Radiobutton:hide() sample", 320, 200) local radiobutton = ui.Radiobutton(win, "Click Me (if you can !)", 100, 80) -- Hides the radiobutton when hovering it function radiobutton:onHover() self:hide() end -- Shows the radiobutton when hovering the radiobutton area function win:onHover(x, y) if (x < radiobutton.x or x > radiobutton.x + radiobutton.width) or (y < radiobutton.y or y > radiobutton.y + radiobutton.height) then radiobutton:show() end end -- Impossible ! function radiobutton:onClick() ui.msg("Great job !!") end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible