FutureBasic Logo

<<    Index    >> FutureBasic

SearchField   statement / function

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

Function syntax
text = searchfield(tag)

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

tag A number (1 through 1000000) that you assign when you create the searchfield 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 searchfield.
enabled A boolean value which specifies whether the searchfield should be enabled or disabled.
text The text that initially appears inside the searchfield.
rect The searchfield'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 searchfield'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
See: textfield


Apple documentation