Next: , Previous: , Up: Part III Button-like Objects   [Contents][Index]


16.5 Button Attributes

For normal buttons the first color argument (col1) to fl_set_object_color() controls the normal color and the second (col2) the color the button has when pushed. For lightbuttons col1 is the color of the light when off and col2 the color when on. For round buttons, col1 is the color of the circle and col2 the color of the circle that is placed inside it when pushed. For round3dbutton, col1 is the color of the inside of the circle and col2 the color of the embedded circle. For bitmapbuttons, col1 is the normal box color (or bitmap background if boxtype is not FL_NO_BOX) and col2 is used to indicate the focus color. The foreground color of the bitmap is controlled by label color (as set via fl_set_object_lcolor(). For scrollbutton, col1 is the overall boundbox color (if boxtype is not FL_NO_BOX), col2 is the arrow color. The label of a scrollbutton must be a string with a number between 1 and 9 (except 5), indicating the arrow direction like on the numerical key pad. The label can have an optional prefix # to indicate uniform scaling. For example, the label "#9" tells that the arrow should be pointing up-right and the arrow has the identical width and height regardless the overall bounding box size.