Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / html / python / mac / progressbar-objects.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="mac.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index' />
<link rel="first" href="mac.html" title='Macintosh Library Modules' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="prev" href="module-EasyDialogs.html" />
<link rel="parent" href="module-EasyDialogs.html" />
<link rel="next" href="module-FrameWork.html" />
<meta name='aesop' content='information' />
<title>2.7.1 ProgressBar Objects </title>
</head>
<body>
<DIV CLASS="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="2.7 EasyDialogs "
href="module-EasyDialogs.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="2.7 EasyDialogs "
href="module-EasyDialogs.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="2.8 FrameWork "
href="module-FrameWork.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Macintosh Library Modules</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-EasyDialogs.html">2.7 EasyDialogs </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-EasyDialogs.html">2.7 EasyDialogs </A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-FrameWork.html">2.8 FrameWork </A>
</div>
<hr /></div>
</DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION004710000000000000000"></A><A NAME="progressbar-objects"></A>
<BR>
2.7.1 ProgressBar Objects
</H2>
<P>
<tt class="class">ProgressBar</tt> objects provide support for modeless progress-bar
dialogs. Both determinate (thermometer style) and indeterminate
(barber-pole style) progress bars are supported. The bar will be
determinate if its maximum value is greater than zero; otherwise it
will be indeterminate.
<span class="versionnote">Changed in version 2.2:
Support for indeterminate-style progress bars was
added.</span>
<P>
The dialog is displayed immediately after creation. If the dialog's
``Cancel'' button is pressed, or if <kbd>Cmd-.</kbd> or <kbd>ESC</kbd> is typed,
the dialog window is hidden and <tt class="exception">KeyboardInterrupt</tt> is
raised (but note that this response does not occur until the progress
bar is next updated, typically via a call to <tt class="method">inc()</tt> or
<tt class="method">set()</tt>). Otherwise, the bar remains visible until the
<tt class="class">ProgressBar</tt> object is discarded.
<P>
<tt class="class">ProgressBar</tt> objects possess the following attributes and
methods:
<P>
<dl><dt><b><tt id='l2h-91' xml:id='l2h-91' class="member">curval</tt></b></dt>
<dd>
The current value (of type integer or long integer) of the progress
bar. The normal access methods coerce <tt class="member">curval</tt> between
<code>0</code> and <tt class="member">maxval</tt>. This attribute should not be altered
directly.
</dl>
<P>
<dl><dt><b><tt id='l2h-92' xml:id='l2h-92' class="member">maxval</tt></b></dt>
<dd>
The maximum value (of type integer or long integer) of the progress
bar; the progress bar (thermometer style) is full when <tt class="member">curval</tt>
equals <tt class="member">maxval</tt>. If <tt class="member">maxval</tt> is <code>0</code>, the bar will
be indeterminate (barber-pole). This attribute should not be altered
directly.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-93' xml:id='l2h-93' class="method">title</tt></b>(</nobr></td>
<td><var></var><big>[</big><var>newstr</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Sets the text in the title bar of the progress dialog to
<var>newstr</var>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-94' xml:id='l2h-94' class="method">label</tt></b>(</nobr></td>
<td><var></var><big>[</big><var>newstr</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Sets the text in the progress box of the progress dialog to
<var>newstr</var>.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-95' xml:id='l2h-95' class="method">set</tt></b>(</nobr></td>
<td><var>value</var><big>[</big><var>, max</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Sets the progress bar's <tt class="member">curval</tt> to <var>value</var>, and also
<tt class="member">maxval</tt> to <var>max</var> if the latter is provided. <var>value</var>
is first coerced between 0 and <tt class="member">maxval</tt>. The thermometer bar
is updated to reflect the changes, including a change from
indeterminate to determinate or vice versa.
</dl>
<P>
<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline">
<td><nobr><b><tt id='l2h-96' xml:id='l2h-96' class="method">inc</tt></b>(</nobr></td>
<td><var></var><big>[</big><var>n</var><big>]</big><var></var>)</td></tr></table></dt>
<dd>
Increments the progress bar's <tt class="member">curval</tt> by <var>n</var>, or by <code>1</code>
if <var>n</var> is not provided. (Note that <var>n</var> may be negative, in
which case the effect is a decrement.) The progress bar is updated to
reflect the change. If the bar is indeterminate, this causes one
``spin'' of the barber pole. The resulting <tt class="member">curval</tt> is coerced
between 0 and <tt class="member">maxval</tt> if incrementing causes it to fall
outside this range.
</dl>
<DIV CLASS="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="2.7 EasyDialogs "
href="module-EasyDialogs.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="2.7 EasyDialogs "
href="module-EasyDialogs.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="2.8 FrameWork "
href="module-FrameWork.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Macintosh Library Modules</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-EasyDialogs.html">2.7 EasyDialogs </A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-EasyDialogs.html">2.7 EasyDialogs </A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="module-FrameWork.html">2.8 FrameWork </A>
</div>
</div>
<hr />
<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>