EDIT

EDIT N

CREATES A SYSTEM OBJECT EDIT AND ALLOCATES IT NUMBER N AS REFERENCE

  • Type: Command
  • Parameter: 1
  • Group: System Objects Creation

ACTION

The command EDIT N creates a system object EDIT, and allocates it a number N. The number N will be used to designate the EDIT.

The created EDIT can then be used through the appropriated commands.

The EDIT is created at position (0,0) : that is TOP = 0 pixel and LEFT = 0 pixel, with dimensions WIDTH = 121 pixels and HEIGHT = 21 pixels.

An EDIT displays an area where the user can enter or modify a line of text.

An EDIT can generate the events : ON_CLICK, ON_DOUBLE_CLICK, ON_CHANGE, ON_KEY_UP, ON_KEY_DOWN.

Remark 1: by default, the EDIT is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the EDIT.

Remark 2: an EDIT is filled with the command TEXT, and is read with the function TEXT$().

SYNTAX: EDIT N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • An EDIT is used to display an area where the user can enter or modify a line of text.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

rem create an EDIT with default position and dimensions

edit 1

rem display a text

text 1,"Enter your name"

rem read the text

a$=text$(1)

print

print

print a$

SEE ALSO

TOP

LEFT

WIDTH

HEIGHT

HINT

HINT_HIDE

FULL_SPACE

COLOR

TEXT

TEXT$()

CLEAR

ON_CLICK

ON_CHANGE

ON_DOUBLE_CLICK

ON_KEY_UP

ON_KEY_DOWN