This class is meant as an emulation of SCTextField. last mod: 10-oct-07 sciss
Also refer to JSCView for different behaviour affecting all widgets
no-op / not working | |
typingColor | not effective |
different behaviour | |
class hierarchy | JSCTextField and JSCNumberBox are subclasses of JSCTextEditBase |
known issues / todo | |
umlaute | using SuperCollider's defaultKeyDownAction mechanism prohibits the proper use of umlaute (basically everything above ASCII 127) ; until this is fixed, the defaultKeyDownAction has been commented out as to provide a better standard behaviour of the gadget ; press enter to commit edit and trigger action function |
Note: please use the abstraction layer GUI.textField if possible! (see GUI)
A textfield allows the user to type in a line of arbitrary text (string) data.
( var w; w = JSCWindow( "JSCTextField" ); b = JSCTextField( w, Rect( 10, 10, 150, 30 )); b.string = "hi there"; b.action = { arg field; field.value.postln }; w.front; ) // does not do the action b.value = "yo"; // does the action b.valueAction = "lala"; b.boxColor = Color.grey; b.stringColor = Color.white; b.align = \center;
... not active at the moment! all keyboard events are handled by the look-and-feel (cursor, copy, paste, deleting etc.)
return | commit edit |