A view displaying editable text.
The text displayed in the view.
text |
A String. |
If -setBoth is true, setting this variable also sets -string to the value interpreted as String.
obj |
Any object, typically one which makes sense to display as a string, such as a Float. |
Gets the same as -string, but when setting also sets -string to the value interpreted as String regardless of the -setBoth flag.
val |
Any object, typically one which makes sense to display as a string, such as a Float. |
The alignment of the displayed text. See Alignment for possible values.
The font used to display the text.
font |
A Font. |
The color used to display the text.
color |
A Color. |
Setting this variable colors the inside of the field under the text with the given color.
color |
A Color. |
The action object evaluated whenever the user changes the text.
The displayed -string.
Always true.
Sets -valueAction to the current drag data.
( w = Window.new.front; a = TextField(w, Rect(10, 10, 150, 20)); a.string = "hi there"; a.action = {arg field; field.value.postln; }; ) // does not do the action a.value = "yo"; a.string = "oy"; a.valueAction_("this is not a pipe"); //does the action, if the value has changed a.doAction; //evaluates the action with the content of the text field as an argument a.background_(Color.grey); a.stringColor_(Color.white); a.align_(\center);