18.4.2 Form Objects

Form objects (returned by make_form() above) have the following methods. Each method corresponds to a C function whose name is prefixed with "fl_"; and whose first argument is a form pointer; please refer to the official FORMS documentation for descriptions.

All the add_*() 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.

formshow_form(placement, bordertype, name)
Show the form.

formhide_form()
Hide the form.

formredraw_form()
Redraw the form.

formset_form_position(x, y)
Set the form's position.

formfreeze_form()
Freeze the form.

formunfreeze_form()
Unfreeze the form.

formactivate_form()
Activate the form.

formdeactivate_form()
Deactivate the form.

formbgn_group()
Begin a new group of objects; return a group object.

formend_group()
End the current group of objects.

formfind_first()
Find the first object in the form.

formfind_last()
Find the last object in the form.

formadd_box(type, x, y, w, h, name)
Add a box object to the form. No extra methods.

formadd_text(type, x, y, w, h, name)
Add a text object to the form. No extra methods.

formadd_clock(type, x, y, w, h, name)
Add a clock object to the form. Method: get_clock().

formadd_button(type, x, y, w, h, name)
Add a button object to the form. Methods: get_button(), set_button().

formadd_lightbutton(type, x, y, w, h, name)
Add a lightbutton object to the form. Methods: get_button(), set_button().

formadd_roundbutton(type, x, y, w, h, name)
Add a roundbutton object to the form. Methods: get_button(), set_button().

formadd_slider(type, x, y, w, h, name)
Add a slider object to the form. Methods: set_slider_value(), get_slider_value(), set_slider_bounds(), get_slider_bounds(), set_slider_return(), set_slider_size(), set_slider_precision(), set_slider_step().

formadd_valslider(type, x, y, w, h, name)
Add a valslider object to the form. Methods: set_slider_value(), get_slider_value(), set_slider_bounds(), get_slider_bounds(), set_slider_return(), set_slider_size(), set_slider_precision(), set_slider_step().

formadd_dial(type, x, y, w, h, name)
Add a dial object to the form. Methods: set_dial_value(), get_dial_value(), set_dial_bounds(), get_dial_bounds().

formadd_positioner(type, x, y, w, h, name)
Add a positioner object to the form. Methods: set_positioner_xvalue(), set_positioner_yvalue(), set_positioner_xbounds(), set_positioner_ybounds(), get_positioner_xvalue(), get_positioner_yvalue(), get_positioner_xbounds(), get_positioner_ybounds().

formadd_counter(type, x, y, w, h, name)
Add a counter object to the form. Methods: set_counter_value(), get_counter_value(), set_counter_bounds(), set_counter_step(), set_counter_precision(), set_counter_return().

formadd_input(type, x, y, w, h, name)
Add a input object to the form. Methods: set_input(), get_input(), set_input_color(), set_input_return().

formadd_menu(type, x, y, w, h, name)
Add a menu object to the form. Methods: set_menu(), get_menu(), addto_menu().

formadd_choice(type, x, y, w, h, name)
Add a choice object to the form. Methods: set_choice(), get_choice(), clear_choice(), addto_choice(), replace_choice(), delete_choice(), get_choice_text(), set_choice_fontsize(), set_choice_fontstyle().

formadd_browser(type, x, y, w, h, name)
Add a browser object to the form. Methods: set_browser_topline(), clear_browser(), add_browser_line(), addto_browser(), insert_browser_line(), delete_browser_line(), replace_browser_line(), get_browser_line(), load_browser(), get_browser_maxline(), select_browser_line(), deselect_browser_line(), deselect_browser(), isselected_browser_line(), get_browser(), set_browser_fontsize(), set_browser_fontstyle(), set_browser_specialkey().

formadd_timer(type, x, y, w, h, name)
Add a timer object to the form. Methods: set_timer(), get_timer().

Form objects have the following data attributes; see the FORMS documentation:

Name C Type Meaning 
windowint (read-only)GL window id
wfloatform width
hfloatform height
xfloatform x origin
yfloatform y origin
deactivatedintnonzero if form is deactivated
visibleintnonzero if form is visible
frozenintnonzero if form is frozen
doublebufintnonzero if double buffering on