FutureBasic Logo

<<    Index    >> FutureBasic

TextField   statement / function



Statement syntax
textfield tag, enabled, text, rect, wndTag

Function syntax
text = textfield(tag)

Description
The textfield statement puts a new textfield in the current output window, or alters an existing textfield's characteristics. The textfield function returns the field's current text as a CFStringRef and is equivalent to calling fn ControlStringValue.

Parameters
Parameter
Description
tag A number (1 through 1000000) that you assign when you create the textfield and that you refer to when altering the field. The number you assign must be different from the tag value of all other existing widgets in the current window. A negative tag hides the textfield.
enabled A boolean value which specifies whether the textfield should be enabled or disabled.
text The text that appears inside the textfield.
rect The textfield's enclosing rectangle. This can be specified in either of two ways:
(i) (x,y,w,h) where x,y are the origin and w,h the size of the field.
(ii) A CGRect value
wndTag An optional parameter for when the textfield's window is not the current output window. Note specifying this parameter does not bring the window to the front or make it the output window.
 
Dialog events
_textFieldDidBeginEditing
_textFieldDidChange
_textFieldDidEndEditing
_textFieldShouldBeginEditing
_textFieldShouldEndEditing
 

See also
textlabel
 
Apple documentation
NSTextField