ImageEn, unit iexFolderTree

TIEFolderTree.CheckBoxes

TIEFolderTree.CheckBoxes


Declaration

property CheckBoxes: Boolean;


Description

Allow selection of nodes using checkboxes.
To determine which nodes are checked, use TIEFolderNode.Checked or the OnCheckBoxChanged event.

Default: False


Examples

// Display checkboxes for selection
IEFolderTree1.CheckBoxes := True;

// Make checked all nodes below selection that contain the text "Temp"
CheckNodesContainingStr( TIEFolderNode( IEFolderTree1.Selected ), 'Temp' );

procedure CheckNodesContainingStr(ANode: TIEFolderNode; const SearchStr: string);
begin
  ANode.Expand(True);  // So content is filled
  ANode := TIEFolderNode( ANode.GetFirstChild );
  if ANode = nil then
    Exit;

  repeat
    ANode.Checked := Pos( Uppercase( SearchStr ), Uppercase( ANode.Text )) > 0;
    CheckNodesContainingStr( ANode, SearchStr );
    ANode := TIEFolderNode( ANode.getNextSibling );
  until ANode = nil;
end;


See Also

TIEFolderNode.Checked
OnCheckBoxChanged