Aracılığıyla paylaş


ReadOnly Property

Specifies whether the user can edit a control, specifies whether a table or view associated with a Cursor object allows updates, or contains a value that indicates if a file in a project can be edited. Available at design time; read/write at run time.

 [Form.]Control.ReadOnly[ = lExpr]
DataEnvironment.Cursor.ReadOnly[ = lExpr]
Project.Files.Item(nItem).ReadOnly

Return Value

  • lExpr
    The settings for the ReadOnly property are:

    Setting

    Description

    True (.T.)

    The user cannot edit the control.The table or view associated with the Cursor object cannot be modified.

    False (.F.)

    (Default) The user can edit the control.The table or view associated with the Cursor object can be modified.

Remarks

Applies To: CheckBox | Column | ComboBox | Cursor | EditBox | File Object | Grid | Spinner | TextBox

Note

When the Cursor is accessed using CURSORSETPROP(), the ReadOnly property is read-only at run time.

The ReadOnly property differs from the Enabled property because when ReadOnly is set to true (.T.), the user can still move to the control.

For Cursors, ReadOnly mimics the NOUPDATE clause of USE.

For combo box controls, the ReadOnly property cannot be set to true (.T.) when the Style property is set to 2 – Drop-down List.

For a file in a project, the ReadOnly property contains a logical value that indicates if the file can be edited. If ReadOnly is true (.T.), the file can be edited; otherwise the file cannot be edited. Read-only at design time and run time.

See Also

Reference

Enabled Property (Visual FoxPro)

USE Command

Other Resources

Properties (Visual FoxPro)