Radiobutton.align readwrite property
Get or set the Radiobutton alignment, which position and size will be aligned relative to its parent (alignment persists even if the size of the parent changes).
This property uses a string
to specify the Radiobutton alignment :
- "all" : the Radiobutton will be aligned along all the parent borders (and will cover the entire parent client area).
- "bottom" : the Radiobutton will be aligned along the bottom border of the parent, preserving its height.
- "top" : the Radiobutton will be aligned along the the top border of the parent, preserving its height.
- "right" : the Radiobutton will be aligned along the right border of the parent, preserving its width.
- "left" : the Radiobutton will be aligned along the left border of the parent, preserving its width.
Return value
This function returns no value.Example
local ui = require "ui"
-- create a fixed Window
local win = ui.Window("Radiobutton:align() sample", "fixed", 320, 200)
-- create a Radiobutton
local widget = ui.Radiobutton(win, "I'm a bottom aligned Radiobutton :)", 25, 25)
-- align the Radiobutton to the bottom of its parent
widget.align = "bottom"
-- shows the Window
win:show()
while win.visible do
ui.update()
end