📄 form-objects.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>18.4.2 Form Objects</title>
<META NAME="description" CONTENT="18.4.2 Form Objects">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="STYLESHEET" href="lib.css" tppabs="http://www.python.org/doc/current/lib/lib.css">
<LINK REL="next" href="forms-objects.html" tppabs="http://www.python.org/doc/current/lib/forms-objects.html">
<LINK REL="previous" href="FL_Functions.html" tppabs="http://www.python.org/doc/current/lib/FL_Functions.html">
<LINK REL="up" href="module-fl.html" tppabs="http://www.python.org/doc/current/lib/module-fl.html">
<LINK REL="next" href="forms-objects.html" tppabs="http://www.python.org/doc/current/lib/forms-objects.html">
</head>
<body>
<DIV CLASS="navigation"><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="FL_Functions.html" tppabs="http://www.python.org/doc/current/lib/FL_Functions.html"><img src="previous.gif" tppabs="http://www.python.org/doc/current/icons/previous.gif" border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="module-fl.html" tppabs="http://www.python.org/doc/current/lib/module-fl.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="forms-objects.html" tppabs="http://www.python.org/doc/current/lib/forms-objects.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="FL_Functions.html" tppabs="http://www.python.org/doc/current/lib/FL_Functions.html">18.4.1 Functions Defined in</A>
<b class="navlabel">Up:</b> <a class="sectref" href="module-fl.html" tppabs="http://www.python.org/doc/current/lib/module-fl.html">18.4 fl </A>
<b class="navlabel">Next:</b> <a class="sectref" href="forms-objects.html" tppabs="http://www.python.org/doc/current/lib/forms-objects.html">18.4.3 FORMS Objects</A>
<br><hr></DIV>
<!--End of Navigation Panel-->
<H2>
<BR>
18.4.2 Form Objects
</H2>
<P>
Form objects (returned by <tt class="function">make_form()</tt> above) have the
following methods. Each method corresponds to a C function whose
name is prefixed with "<tt class="samp">fl_</tt>"; and whose first argument is a form
pointer; please refer to the official FORMS documentation for
descriptions.
<P>
All the <tt class="method">add_*()</tt> methods return a Python object representing
the FORMS object. Methods of FORMS objects are described below. Most
kinds of FORMS object also have some methods specific to that kind;
these methods are listed here.
<P>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3181'><tt class='method'>show_form</tt></a></b> (<var>placement, bordertype, name</var>)
<dd>
Show the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3182'><tt class='method'>hide_form</tt></a></b> ()
<dd>
Hide the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3183'><tt class='method'>redraw_form</tt></a></b> ()
<dd>
Redraw the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3184'><tt class='method'>set_form_position</tt></a></b> (<var>x, y</var>)
<dd>
Set the form's position.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3185'><tt class='method'>freeze_form</tt></a></b> ()
<dd>
Freeze the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3186'><tt class='method'>unfreeze_form</tt></a></b> ()
<dd>
Unfreeze the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3187'><tt class='method'>activate_form</tt></a></b> ()
<dd>
Activate the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3188'><tt class='method'>deactivate_form</tt></a></b> ()
<dd>
Deactivate the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3189'><tt class='method'>bgn_group</tt></a></b> ()
<dd>
Begin a new group of objects; return a group object.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3190'><tt class='method'>end_group</tt></a></b> ()
<dd>
End the current group of objects.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3191'><tt class='method'>find_first</tt></a></b> ()
<dd>
Find the first object in the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3192'><tt class='method'>find_last</tt></a></b> ()
<dd>
Find the last object in the form.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3193'><tt class='method'>add_box</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a box object to the form.
No extra methods.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3194'><tt class='method'>add_text</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a text object to the form.
No extra methods.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3195'><tt class='method'>add_clock</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a clock object to the form.
<BR>
Method:
<tt class="method">get_clock()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3196'><tt class='method'>add_button</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a button object to the form.
<BR>
Methods:
<tt class="method">get_button()</tt>,
<tt class="method">set_button()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3197'><tt class='method'>add_lightbutton</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a lightbutton object to the form.
<BR>
Methods:
<tt class="method">get_button()</tt>,
<tt class="method">set_button()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3198'><tt class='method'>add_roundbutton</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a roundbutton object to the form.
<BR>
Methods:
<tt class="method">get_button()</tt>,
<tt class="method">set_button()</tt>.
</dl>
<DIV ALIGN="LEFT">
</DIV>
<P>
<DIV ALIGN="LEFT"></DIV><dl><dt><b><a name='l2h-3199'><tt class='method'>add_slider</tt></a></b> (<var>type, x, y, w, h, name</var>)
<dd>
Add a slider object to the form.
<BR>
Methods:
<tt class="method">set_slider_value()</tt>,
<tt class="method">get_slider_value()</tt>,
<tt class="method">set_slider_bounds()</tt>,
<tt class="method">get_slider_bounds()</tt>,
<tt class="method">set_slider_return()</tt>,
<tt class="method">set_slider_size()</tt>,
<tt class="method">set_slider_precision()</tt>,
<tt class="method">set_slider_step()</tt>.
</dl>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -