Next: , Previous: , Up: Nmenu Object   [Contents][Index]


19.2.4 Nmenu Attributes

While not "active" the background of the nmenu object is drawn in the color that can be controlled via the first color argument, col1, of fl_set_object_color(). When "active" (i.e., while the popup is shown) its background is drawn in the color of second color argument, col2, of the same function. The color of the label when "inactive" is controlled via fl_set_object_lcolor(). When in "active" state the color use for the label can be set via the function

FL_COLOR fl_set_nmenu_hl_text_color(FL_OBJECT *obj, FL_COLOR color);

The function returns the old color on success or FL_MAX_COLORS on failure. Per default this color is FL_BLACK for nmenus that are shown as a button while being "active" while for normal nmenus it’s the same color that is used items in the popup when the mouse is hovering over them.

The size and style of the font used for the label of the nmenu object can be set via fl_set_object_lsize() and fl_set_object_lstyle().

The rest of the appearance of a nmenu object is given by the appearance of the popup. These can be directly set via the functions for setting the popup appearance as described in Popup Attributes. To find out which popup is associated with the nmenu object use the function

FL_POPUP *fl_get_nmenu_popup(FL_OBJECT *obj);

and then use the popup specific functions to set the appearance. The same also holds for the appearance etc. of the items of the popup, a lot of functions exist that allow to set the attributes of entries of a popup, see Popup Attributes.


Next: , Previous: , Up: Nmenu Object   [Contents][Index]