Lightningbeam/PyGUI-2.5.3/Doc/RadioGroup.html

62 lines
2.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head><title>PyGUI - class RadioGroup</title>
<meta name="GENERATOR" content="Mozilla/3.01Gold (X11; I; SunOS 5.6 sun4u) [Netscape]"></head>
<body>
<h1>class <tt>RadioGroup</tt></h1>
<p>A&nbsp;RadioGroup is used to coordinate the activity of a group of <a href="RadioButton.html">RadioButtons</a>. It ensures that only one of the
RadioButtons is on at a time, and provides a <tt>value</tt> property which
is equal to the <tt>value</tt> of the currently selected RadioButton. It
also provides an <tt>action</tt> property which is invoked when the user
changes the selection.<br>
</p>
<p>You can iterate over the RadioButtons contained in a RadioGroup, which means you can use a RadioGroup directly in the <a href="Container.html#place_row"><span style="font-family: monospace;">place_row</span></a> and <a style="font-family: monospace;" href="Container.html#place_column">place_column</a> methods of a container.<br>
</p>
<h2>Properties</h2>
<dl>
<dl>
<dt><tt>value</tt></dt>
<dd>The value of the currently selected RadioButton. Setting this property
updates the states of the&nbsp;RadioButtons accordingly.</dd>
</dl>
</dl>
<blockquote>
<dl>
<dt><tt>action</tt></dt>
<dd>Action to perform when the value changes as a result of the user
clicking on a radio button.</dd>
</dl>
</blockquote>
<h2>Constructor</h2>
<dl>
<dl>
<dt><tt>RadioGroup(items)</tt></dt>
<dd>Constructs a RadioGroup containing the given list of RadioButtons.</dd>
</dl>
</dl>
<h2>Methods</h2>
<dl>
<dl>
<dt><tt>add_item(</tt><i>item</i><tt>)<br>add_items([</tt><i>item, </i>...<span style="font-family: monospace;">])</span></dt>
<dd>Adds one or more RadioButtons to this group.</dd>
</dl>
</dl>
<dl>
<dl>
<dt><tt>remove_item(</tt><i>item</i><tt>)<br>remove_items([</tt><i>item, ...</i><span style="font-family: monospace;">])</span></dt>
<dd>Removes one or more RadioButtons from this group.</dd>
</dl>
</dl>
<h2>Operations</h2>
<dl style="margin-left: 40px;">
<dt><span style="font-family: monospace;">iter(</span><span style="font-style: italic;">group</span><span style="font-family: monospace;">)</span></dt>
<dd>Returns an iterator over the RadioButtons contained in the group.<br>
</dd>
</dl>
<p>---</p>
</body></html>