textbutton
Arguments
None.
Attributes
active [int] (default: 1)
When active mode is set to 0, the textbutton object will not respond to mouse clicks, and the object is grayed out. This attribute is enabled by default.
align [atom]!
Sets the text alignment.
bgcolor [4 floats]
Sets the background color of the textbutton object when the button is in the "off" state in RGBA format.
bgoncolor [4 floats]
Sets the background color of the textbutton object when the button is in the "on" state in RGBA format.
blinktime [int] (default: 150)
Specifies the duration (in milliseconds) that the textbutton object will flash when it is clicked upon or receives a message.
fontlink [int] (default: 0)
Toggles setting the size of the button to the currently selected font size and character width.
legacytextcolor [int] (default: 0)7.0.0
Toggles legacy behavior for text and allows for the selection of a text color for "off" states. The text off color is set using the
attribute.mode [int] (default: 0)
Sets the button mode.
Possible values:
0 = 'Button'
1 = 'Toggle'
outputmode [int] (default: 1)
Sets the output mode. Output modes are:
0: Send output on mouse down
1: Send output on mouse up (default)
Possible values:
0 = 'Mouse down'
1 = 'Mouse up'
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: 0.)
Sets the amount in pixels by which to round the textbutton shape.
spacing_x [float] (default: 4.)
Sets the horizontal spacing for the textbutton object in pixels.
spacing_y [float] (default: 4.)
Sets the vertical spacing for the textbutton 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.
text [atom] (default: Button)
Sets the button label, and sets the the "off" state label when mode is set to 1 (toggle).
textcolor [4 floats]
Sets the text color for the textbutton object when the button is in the "off" state in RGBA format. The attribute is mapped to the style color.
texton [atom] (default: Button On)
Button label in "on" state
textoncolor [4 floats]
Sets the text color for the textbutton object when the button is in the "on" state in RGBA format. The attribute is mapped to the style color.
textovercolor [4 floats]
Sets the text color for the textbutton object on mouseover when the button is in the "off" state in RGBA format. The attribute is mapped to the style color.
tosymbol [int] (default: 1)
Output text as a single symbol
truncate [int] (default: 1)
Sets the text truncation mode. Alignment modes are:
0: no truncation
1: truncate from the right (e.g. abcdef... . This is the default.
2: truncate from center (e.g. abcd...wxyz
Possible values:
0 = 'No truncation'
1 = 'Truncate from the right'
2 = 'Truncate from the middle'
underline [int] (default: 0)
The word textbutton object. The default is 0 (no underlining).
, followed by a zero or one, toggles the underlining of text in theusebgoncolor [int] (default: 0)7.0.0
Toggles the use of a background "on" color.
usetextovercolor [int] (default: 0)7.0.0
Toggles the use of a different color when hovering over the text.
Common Box Attributes
Parameter Attributes
Messages
bang
mode 0 (button): A message will re-trigger the object's output.
mode 1 (trigger): A message will switch the object's state and trigger the output.
int
Arguments
If the mode attribute is set to 1 (toggle), and the number input is 1, textbutton is set to 'on', a 1 is sent out the left outlet and the texton message is displayed and set out the middle outlet.
If the number input is 0, textbutton is set to 'off', a 0 is sent out the left outlet and the text message is displayed and set out the middle outlet.
float
Arguments
(mouse)
If the mode attribute is set to 1 (toggle), and the initial state of the toggle is 0, textbutton is set to 'on', a 1 is sent out the left outlet and the texton message is displayed and set out the middle outlet.
If initial state of the toggle is 1, textbutton is set to 'off', a 0 is sent out the left outlet and the text message is displayed and set out the middle outlet.
set
Arguments
setsymbol
Arguments
symbol
Arguments
See Also
Name | Description |
---|---|
matrixctrl | |
message | |
pictctrl | |
pictslider | |
tab | |
ubutton |