Hello!
I TTree, how do I prevent all nodes from getting selected?
Best regards, Mikael
Prevent nodes from getting selected
Re: Prevent nodes from getting selected
Hello,
If you don't want to have any shape in the Tree1.Selected list, you can clear it at OnClick event:
Or at OnMouseDown:
If you only want the nodes not to look as selected, you can just change the color of the selected shapes and font:Lenfors wrote:I TTree, how do I prevent all nodes from getting selected?
Code: Select all
Tree1.Selected.Color:=clNone;
Tree1.Selected.TextColor:=clBlack;
Code: Select all
procedure TForm1.Tree1Click(Sender: TObject);
begin
Tree1.Selected.Clear;
end;
Code: Select all
procedure TForm1.Tree1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Tree1.Selected.Clear;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |