esf1edittext

Description

This is an implementation of an editable text control. Currently multiline text is not supported and pressing the Enter key will result in the current line rolling up out of sight.

Object Value

None

Type Tags

esf1control

Properties

PropertyTypeAccessDescription
enabledbooleanread-only This is a boolean value that shows whether the control is enabled or not (a disabled control cannot hold focus or be clicked).
focusablebooleanread-only This is a boolean value that shows whether this type of control can have focus. For this object type it is always set to .true.
formesf1read-only Contains a reference to the form (if any) to which the control is attached.
heightintegerread-only The current height of the control.
leftintegerread-only The current horizontal position of the upper left corner of the control.
nextesf1controlread-only Contains a reference to the next control in the ring of controls on the form.
ongotfocusesf1eventread/write Contains a reference to the embedded esf1event that is raised when focus is moved to the control.
onlostfocusesf1eventread/write Contains a reference to the embedded esf1event that is raised when focus is moved away from the control.
topintegerread-only The current vertical position of the upper left corner of the control.
typetyperead-only Contains a reference to the esf1edittext type object.
widthintegerread-only The current width of the control.

Methods

enable()

Prototype

esf1edittextvar.enable ( boolean enabled )

Description

Enables or disables the control.

Parameters
NameDefaultTypeDescription
enabledNone  An entry of .true enables and .false disables the control.

gettext()

Prototype

esf1edittextvar.gettext ()

Description

Returns the current text in the control.

Parameters

None.

move()

Prototype

esf1edittextvar.move ( integer left, integer top, integer width, integer height, integer error )

Description

Moves the control. For each of left, top, width and height the default value is the current value. An error object can be provided to catch errors. The new position must be within the bounds of the form or an error is raised (or output in the error object). Returns .nul. By using the position name, such as foo.move(top=5) only the top position will be changed, all others remain the same because they default to their current value.

Parameters
NameDefaultTypeDescription
leftCurrent left positioninteger The new horizontal position of the upper left corner of the control.
topCurrent top positioninteger The new vertical position of the upper left corner of the control.
widthCurrent control widthinteger The new width of the control.
heightCurrent control heightinteger The new height of the control.
errornoneinteger This parameter must be an object, not an integer value. If an error (other than a syntax or parameter passing error) occurs because the new object position is not completely within the form, then the error number will be output to the specified object. If no error object is provided and an error occurs then the program will exit with an unhandled exception.

remove()

Prototype

esf1edittextvar.remove ()

Description

Removes the control from the ring of controls. A removed control cannot hold focus and is not displayed.

Parameters

None.

setnext()

Prototype

esf1edittextvar.setnext ( esf1control next )

Description

Moves or inserts this control into the ring of controls in a position so that its 'next' will be the specified control. This also determines the tab order.

Parameters
NameDefaultTypeDescription
nextnoneesf1control This is the reference to the esf1control that this control will precede.

settext()

Prototype

esf1edittextvar.settext ( string text )

Description

Changes the text in the edit control to that of the text passed. Returns .nul.

Parameters
NameDefaultTypeDescription
textnonestring An entry of .nul or .inf will cause an error, any other value will be assigned although a value can be too long to be completely displayable.