A newer version of Max is available. Click here to access the latest version of the documentation

tab Reference

Tab control

tab

Description

The tab can be used to create multiple button and multiple column displays and interfaces.

Examples

The tab object can be used to create multiple column button/toggle displays and interfaces

Arguments

None.

Attributes

activesafe [int] (default: 1)

When set to one, protects the currently active tab from text truncation.

bgcolor [4 floats]7.0.0

Sets the background color of the tab objet in RGBA format.

button [int] (default: 0)

Toggles button mode for the tab object.

colorselectedtext [int] (default: 0)7.0.0

Toggles the coloring of a contrasting text color for selected and unselected text. When enabled, the selected text color is set using the htabcolor attribute, and the unselected text color is set using the tabcolor attribute.

contrastactivetab [int] (default: 1)7.0.0

Toggles the use of a contrasting tab color.

gradient [float] (default: 0.)

Toggles the application of a gradient effect to the tab buttons.

htabcolor [4 floats]

Sets the color of the selected tab in RGBA format. The htabcolor attribute is mapped to the color style color.

margin [int] (default: 4)

Sets the text margin, in pixels, for tab text.

mode [int] (default: 0)

Sets the text tab layout mode. The modes are:

0 separate tab entries are equally spaced. This is the default.
1 separate tab entries are proportionally spaced according to the text.
Note: to add multiple words, use the backslash before a space (e.g. "one\ down")

Possible values:

0 = 'Equal Spaced'
1 = 'Proportional'

multiline [int] (default: 1)

Toggles allowing multiple lines of text in a tab. When set, you can resize the object to create multicolumn displays.

parameter_enable [int]

Enables use of this object with Max for Live Parameters and allows for setting initial parameter values in the Max environment.

parameter_mappable [int] (default: 1)

When parameter_mappable is enabled, the object will be available for mapping to keyboard or MIDI input using the Mappings feature. (default = 1).

rounded [float] (default: 8.)

Sets the radius, in pixels for the tab object.

segmented [int] (default: 0)

Segmented

spacing_x [float] (default: 4.)

Sets the horizontal spacing for the tab object in pixels.

spacing_y [float] (default: 4.)

Sets the vertical spacing for the tab object in pixels.

style [symbol] (default: )7.0.0

Sets the style to be applied to the object. Styles can be set using the Format palette.

tabcolor [4 floats]

Sets the tab color for unselected items in RGBA format. The tabcolor attribute is mapped to the elementcolor style color.

tabs [64 symbols] (default: one two three)

Sets the tab text for each tab in the tab object.

textcolor [4 floats]

Sets the text color for the tab object when the tab is unselected in RGBA format. The textcolor attribute is mapped to the textcolor_inverse style color.

truncate [int] (default: 1)

Sets the truncation to be applied to tab text

Possible values:

0 = 'No truncation'
1 = 'Truncate from the right'
2 = 'Truncate from the middle'

valign [int] (default: 1)

Sets the vertical alignment for tabs

Possible values:

0 = 'Top'
1 = 'Center'
2 = 'Bottom'

Common Box Attributes

Parameter Attributes

Messages

bang

bang message will retrigger the object's output.

int

Arguments

tab [int]
The number specifies a tab item to be sent out, and causes tab to display that item and send the index out the first outlet and the tab text out the second outlet. The items are numbered starting at 0. A tab can also be chosen with the mouse.

float

Arguments

tab [float]
Converted to int.

(mouse)

Clicking on a tab button will highlight and set the selection and send the index out the first outlet and the tab text out the second outlet.

next

Selects the next index to the tab object and causes tab to display that item and send the new index out the first outlet and the tab text out the second outlet. If the last index is currently displayed, it wraps around to the first index.

prev

Selects the previous index to the tab object and causes tab to display that item and send the new index out the first outlet and the tab text out the second outlet. If the first index is currently displayed, it wraps around to the last index.

set

Arguments

tab [list]
The word set, followed by a number, specifies a tab item to be selected, and causes tab to display that item, but does not cause any output.

setsymbol

Arguments

tab [list]
The word setsymbol, followed by a symbol that specifies a tab item, causes tab to display that item but does not send output.

symbol

Arguments

tab name [list]
The word symbol, followed by a symbol that specifies a tab item, causes tab to display that item and send the index out the first outlet and the tab text out the second outlet.

See Also

Name Description
Max For Live Max For Live
matrixctrl
pictctrl
pictslider
textbutton
ubutton