version 6.0
WR TEXT ACCESS (area; mode)
| Parameter | Type | Description | |
| area | Longint | 4D Write area | |
| mode | Integer | 0=Allow access | |
| 1=Restrict access |
Description
The WR TEXT ACCESS command enables you to control access to the text in Area. If mode equals 0, 4D Write allows modifications to area. If mode equals 1, 4D Write displays area in read-only mode.
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. When access to a formerly restricted area is changed, you must call WR SET DOC PROPERTY (Area;wr view menubar;1) and WR SET DOC PROPERTY (Area;wr view rulers;1) 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;1) WR SET AREA PROPERTY(TheArea;wr allow drag;0) WR SET AREA PROPERTY(TheArea;wr allow drop;0)
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;1) End if
See Also