Locked: Boolean;
Locked: boolean;
The Locked property determines whether it is possible to change selection and edit element text in the component.
Available values:
False. Default. It is allowed to change selection and edit elements text in the component.
True. It will be blocked to change selection and edit elements text.Selecting True for the Locked property will automatically set True to the ITreeControl.ReadOnly property.
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.
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:
for Fore example: Forms
for Fore.NET example: Forms, Forms.Net.
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: