Returns or sets a value indicating whether a control can be edited.
object.Locked [ = boolean]
The parts of the Locked property syntax are described in the following table.
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
boolean | A Boolean expression that specifies whether the control can be edited, as described in Settings. |
The settings for boolean are described in the following table.
Setting | Description |
---|---|
True | TextBox control. You can scroll and highlight the text in the control, but you cannot edit it. The program can still modify the text by changing the Text property. |
ComboBox object. You cannot type in the textbox. | |
False | TextBox control. You can edit the text in the control. |
ComboBox object. You can type in the textbox and drop down its list. |
For the ComboBox control, when Locked is set to True, the user cannot change any data, but can highlight data in the text box and copy it. This property does not affect programmatic access to the ComboBox.