Command WR TEXT ACCESS

4D Write

WR TEXT ACCESS

version 6.0


WR TEXT ACCESS (area; mode)

ParameterTypeDescription
areaLongint4D Write area
modeInteger0=Allow access
1=Restrict access

Description

The WR TEXT ACCESS command enables you to control access to the text in Area. When an area is displayed in read-only mode, the menus, rulers, and Zoom box are not present. The text can be seen and scrolled but not modified.

In the mode parameter, you can pass one of the following constants, found in the "WR Parameters" theme:

Constants (value)Description
wr allowed access (0)Free access to the area
wr restricted access (1)The user can access area information in read-only mode

When access to a formerly restricted area is changed by passing wr allowed access in mode, you must call WR SET DOC PROPERTY (Area;wr view menubar;wr displayed) and WR SET DOC PROPERTY (Area;wr view rulers;wr displayed) to display the ruler and menu bar.

About drag and drop

This command controls the editing of an area using keyboard data entry and copy/paste, but not using drag and drop to or from the area. This operation may be useful within certain interfaces; however, if you want to prevent any modification in the area, use the following statements:

   WR TEXT ACCESS(TheArea;wr restricted access)
   WR SET AREA PROPERTY(TheArea;wr allow drag;wr drag not allowed)
   WR SET AREA PROPERTY(TheArea;wr allow drop;wr drop not allowed)

Example

The following example is the form method of the form that contains area. It sets area to read-only when the form is loaded.

   If (Form event=On load)
      WR TEXT ACCESS (area;wr restricted access)
   End if

See Also

WR SET DOC PROPERTY.