EDITTEXT Statement
Syntax:
EDITTEXT text, id, x, y, width, height [,style]
The EDITTEXT statement creates an entry-field control. This control is
a rectangle in which the user can type and edit text. The control displays
a pointer when the user selects the control. The user can then use the
keyboard to enter text or edit the existing text. Editing keys include
the BACKSPACE and DELETE keys. By using the mouse or the DIRECTION keys,
the user can select the character or characters to delete or select the
place to insert new characters.
The EDITTEXT statement defines the text, identifier, dimensions, and attributes
of a control window. The predefined class for this control is WC_ENTRYFIELD.
If you do not specify a style, the default style is ES_AUTOSCROLL and WS_TABSTOP.
text
Specifies text that is displayed in the rectangular
area of the control. This field must contain zero or more characters enclosed
in double quotation marks. Character values must be in the range 1 through
255. If a double quotation mark is required in the text, you must include
the double quotation mark twice.
id
Specifies the control identifier. This value
is a signed integer -32768 through 32767, an unsigned integer in the range
of 1 through 65535, or a simple expression that evaluates to a value in
these ranges.
x
Specifies the x-coordinate of the lower-left
corner of the control. This value is a signed integer -32768 through 32767,
or an expression consisting of integers and the addition (+) or subtraction
(-) operator. The coordinate is assumed to be in dialog units and is relative
to the origin of the dialog window.
y
Specifies the y-coordinate of the lower-left
corner of the control. This value is a signed integer -32768 through 32767,
or an expression consisting of integers and the addition (+) or subtraction
(-) operator. The coordinate is assumed to be in dialog units and is relative
to the origin of the dialog window.
width
Specifies the width of the control. This
value is any integer 0 through 65535, or an expression consisting of integers
and the addition (+) or subtraction (-) operator. The width is in n-character
units.
height
Specifies the height of the control.
This value is any integer 0 through 65535, or an expression consisting
of integers and the addition (+) or subtraction (-) operator. The height
is in 1/8-character units.
style
Specifies the control styles. This value
can be a combination of the styles specified for WC_ENTRYFIELD. You can
use the bitwise OR ( | ) operator to combine styles.
Comments
The EDITTEXT control statement is identical to the ENTRYFIELD control statement.
Use the EDITTEXT statement only in a DIALOG or WINDOW statement.
Example
This example creates an entry-field control that is not labeled.
EDITTEXT "", 101, 10, 10, 24, 50
[Back: DLGTEMPLATE Statement]
[Next: elif Directive]