Previous: , Up: Folder Object   [Contents][Index]


20.1.5 Remarks

By default, the tab for each folder is drawn with a corner of 3 pixels so it appears to be a trapezoid rather than a square. To change the appearance of the tabs, you can adjust the corner pixels using the following routine

int fl_set_default_tabfolder_corner(int n);

where n is the number of corner pixels. A value of 1 or 0 makes the tabs appear to be squarish. The function returns the old value.

A tabbed folder is a composite object consisting of a canvas and several foldertab buttons. Each individual form is shown inside the canvas. Folder switching is accomplished by some internal callbacks bound to the foldertab button. Should the application change the callback functions of the foldertab buttons, these new callback functions must take the responsibility of switching the active folder.

Some visual effects like colors and label font of the tab rider buttons can be set all at once by calling the corresponding functions (i.e., fl_set_object_color(), fl_set_object_lstyle() etc.) with the tabbed folder object as the first argument. Individual tab rider buttons can also be modified by calling those function with the corresponding return value of fl_addto_tabfolder() as the first argument.

fl_free_object(tabfolder) does not free the individual forms that make up the tabfolder.

See the demo program folder.c for an example use of tabbed folder class.

A nested tabfolder might not work correctly at the moment.