IUP/Controls/IupRadio
From Vendetta Lua
Revision as of 08:11, 12 May 2023 by Draugath (Talk | contribs) (Created page with "__NOTOC__ __NOEDITSECTION__ {{IUP Controls}} Creates the radio element for grouping mutual exclusive toggles. Only one of its descendet toggles will be active at a time. The...")
Controls |
Dialog |
Creates the radio element for grouping mutual exclusive toggles. Only one of its descendet toggles will be active at a time. The toggles can be at any composion.
Creation
iup.radio{element: ihandle} -> (elem: ihandle)
- element: Identifier of an interface element. Usually it is a vbox or an hbox containing the toggles associated to the radio.
- This function returns the identifier of the created radio, or nil if an error occurs.
Attributes
- VALUE: Identifier of the active toggle.
Examples
-- IupRadio Example in IupLua -- Creates a dialog for the user to select his/her gender. -- In this case, the radio element is essential to prevent the user from -- selecting both options. male = iup.toggle{title="Male"} female = iup.toggle{title="Female"} exclusive = iup.radio { iup.vbox { male, female }; value=female, tip="Two state button - Exclusive - RADIO" } frame = iup.frame{exclusive; title="Gender"} dialog = iup.dialog { iup.hbox { iup.fill{}, frame, iup.fill{} }; title="IupRadio", size=140, resize="NO", minbox="NO", maxbox="NO" } dialog:show()