Class RadioButton

A radio button

Extends CheckBox, so the fields RadioButton uses for drawing are the same as those of CheckBox.

Usage:

     -- Create a group of buttons that print when they are selected.
     local group = Panel(0, 0)
     local numButtons = 10
     for i = 1, numButtons, 1 do
       local button = RadioButton(i * 20, 0, 16)
       button:addListener("selected", function(t, k, old, new)
         if new then
           print("Button " .. i .. " was selected")
         end
       end)
       group:add(button)
     end

Constructor

RadioButton:_init (x, y, size) Constructs a new RadioButton.


Constructor

RadioButton:_init (x, y, size)
Constructs a new RadioButton.

Parameters:

  • x The x coordinate of the new component, relative to its parent.
  • y The y coordinate of the new component, relative to its parent.
  • size The width and height of the new component.
generated by LDoc 1.4.3 Last updated 2015-02-10 07:20:59