ITreeControl.Locked

Syntax

Locked: Boolean;

Locked: boolean;

Description

The Locked property determines whether it is possible to change selection and edit element text in the component.

Comments

Available values:

NOTE. This property locks the possibility to change selection and to edit elements in the component only with the help of the mouse and keyboard. It is possible to change selection and to edit the text of the elements using the appropriate properties and method in the core, if the Locked property has any values.

Example

Executing the example requires that the from contains the Button component named Button1 and the TreeList component named TreeList1 (for Fore.NET example use the TreeListNet component named TreeListNet1.

Add links to the system assemblies:

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    
TreeList1.Locked := False;
End Sub Button1OnClick;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
    TreeListNet1.Locked := 
True;
End Sub;

As a result of example execution, after clicking the button for the TreeList component it will be allowed to edit element text and change selection.

See also:

ITreeControl | ITreeControl.ReadOnly