<td><b>[<ahref="../nvwidgets/index.html">Overview</a>][<ahref="../nvwidgets/index-2.html">Constants</a>][<ahref="../nvwidgets/index-3.html">Types</a>][<ahref="../nvwidgets/index-4.html">Classes</a>][<ahref="../nvwidgets/index-5.html">Procedures and functions</a>][<ahref="../nvwidgets/index-8.html">Index</a>]</b></td>
<tdalign="right"><spanclass="bartitle">Reference for unit 'nvWidgets' (<ahref="../index.html">#nvidia-widgets</a>)</span></td>
</tr>
</table>
<h1>UIContext.doButton</h1>
<p>UI method for rendering and processing a push button</p>
<td><p><tt><spanclass="code"> <spanclass="kw">const </span>r<spanclass="sym">: </span><ahref="../nvwidgets/rect.html">Rect</a><spanclass="sym">;</span><spanclass="cmt"> //optionally provides a location and size for the button</span></span></tt></p></td>
<td><p><tt><spanclass="code"> <spanclass="kw">const </span>Text<spanclass="sym">: </span><spanclass="sym">;</span><spanclass="cmt"> //text to display on the button</span></span></tt></p></td>
<td><p><tt><spanclass="code"> <spanclass="kw">var </span>state<spanclass="sym">: </span>Boolean<spanclass="sym">;</span><spanclass="cmt"> //whether the button is depressed</span></span></tt></p></td>
<td><p><tt><spanclass="code"> style<spanclass="sym">: </span>Integer <spanclass="sym">=</span><spanclass="num">0</span></span><spanclass="cmt"> //optional style flag to modify the look (default = 0)</span></span></tt></p></td>
<td><p><tt><spanclass="code"> <spanclass="kw">const </span>r<spanclass="sym">: </span><ahref="../nvwidgets/rect.html">Rect</a><spanclass="sym">;</span><spanclass="cmt"> //optionally provides a location and size for the button</span></span></tt></p></td>
<td><p><tt><spanclass="code"> <spanclass="kw">const </span>Text<spanclass="sym">: </span><spanclass="cmt"> //text to display on the button</span></span></tt></p></td>
<p>The button method does only take a text and state variable. This variable is modified if the button is pressed or depressed. When a state change occurs the method function returns <var>True</var>.</p>