Advertisement
TLama

Untitled

Aug 28th, 2014
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.39 KB | None | 0 0
  1. var
  2.   I: Integer;
  3.   Products: IList;
  4. begin
  5.   Products := MyClass.Products() as IList;
  6.  
  7.   TreeView.Items.Clear;
  8.   TreeView.Items.BeginUpdate;
  9.   try
  10.     for I := 0 to (Products as ICollection).Count - 1 do
  11.       TreeView.Items.Add(Products.Item[I]); // <- don't know what objects are you passing, so a cast to string might be wrong here
  12.   finally
  13.     TreeView.Items.EndUpdate;
  14.   end;
  15. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement