Locked: Boolean;
The Locked property determines whether it is possible to change selection and edit element text in the component.
Available values:
True. Indicates whether selection change and elements text editing are locked. When the Locked property is set to True, the ITreeControl.ReadOnly property is automatically set to True.
NOTE. This property locks selection change and elements editing in the component only via mouse click. The possibility to change selection and edit elements text using the corresponding ITreeListNode.Text and ITreeListNode.ColumnText properties and methods in the kernel is available at any values of the Locked property.
False. Default. Selection change and elements text editing are allowed in the component. To edit element text, select the element and then once again click the selected element with a mouse. To change selection, open the component's context menu.
NOTE. Editing of elements text is not available if the ITreeControl.ReadOnly property is set to True by default.
Executing the example requires a form, the Button component named Button1 and the ListView component named ListView1 on the form.
Add a link to the Forms system assembly.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
TreeList1.Locked := False;
TreeList1.ReadOnly := False;
End Sub Button1OnClick;
After executing the example, after the button is clicked, elements text editing and selection change are allowed for the TreeList component.
See also: