Command WR LOCK DOCUMENT

4D Write

WR LOCK DOCUMENT

version 6.5


WR LOCK DOCUMENT (area; status)

ParameterTypeDescription
areaLongint4D Write area
statusInteger0=unlocked
1=locked

Description

The WR LOCK DOCUMENT command prevents users from modifying the 4D Write area referenced by area. Once the document is locked, users cannot paste text, cut text, enter or modify text. Scrolling, copying, searching and printing the document are still possible.

To determine the lock status of the current document, you can use the WR GET DOCUMENT INFO command. This information is also displayed in the Document information dialog. You can access that dialog by selecting Document information from the Tools menu.

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

Constants (value)Description
wr locked document (0)The document will be unlocked
wr unlocked document (1)The document will be locked

Example

You want to close records definitively and prevent users from editing them.

      `It will not be possible to edit the document
   WR LOCK DOCUMENT(Area;wr locked document )
      `Users will not be able to select the menu command Tools>Document Information
      `to open the dialog box and enable the option
   WR LOCK COMMAND(Area;wr cmd doc information;wr unlocked document )

See Also

WR LOCK COMMAND.