Next: , Previous: , Up: Part I Defining Forms   [Contents][Index]


3.9 Hiding and Showing

It is possible to temporarily hide certain objects or groups of objects. To this end, use the routine

void fl_hide_object(FL_OBJECT *obj);

obj is the object to hide or the group of objects to hide. Hidden objects don’t play any role anymore. All routines on the form act as if the object does not exist. To make the object or group of objects visible again use

void fl_show_object(FL_OBJECT *obj);

Hiding and showing (groups of) objects are useful to change the appearance of a form depending on particular information provided by the user. You can also make overlapping groups in the form and take care that only one of them is visible.

If you want to know if an object is shown you can use

int fl_object_is_visible(FL_OBJECT *obj);

Please note for an object to be visible also the form it belongs to must be shown, which isn’t factored into the return value.