Radiobutton:autosize() method


Resize the Radiobutton automatically to accommodate its content.

Return value

This function returns no value.

Example

local ui = require "ui" -- create a simple Window local win = ui.Window("Radiobutton:autosize() sample", 320, 200) -- add a tiny Radiobutton... local radiobutton = ui.Radiobutton(win, "LuaRT", 120, 70) -- ...with a big font radiobutton.font = "Impact" radiobutton.fontsize = 18 -- resize to a small radiobutton radiobutton.width = 30 radiobutton.height = 16 -- ...and a Radiobutton ui.Button(win, "Autosize Radiobutton", 112, 10).onClick = function (self) radiobutton:autosize() self.enabled = false end win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible