SHARE
TWEET

Untitled

a guest Jun 16th, 2013 29 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var
  2.   Item1 : TTreeViewItem;
  3.   Item2 : TTreeViewItem;
  4. begin
  5.   Item1 := TTreeViewItem.Create(Self);
  6.   Item1.Text := 'My First Node';
  7.   Item1.Parent := TreeView1;
  8.  
  9.   Item2 := TTreeViewItem.Create(Self);
  10.   Item2.Text := 'My Child Node';
  11.   Item2.Parent := Item1;
  12. end;
  13.        
  14. Button := TButton.Create(self);
  15.   Button.Text := 'A Button';
  16.   Button.Position.X := 100;
  17.   Button.Parent := Item2;
  18.        
  19. Var
  20. TempItem:TTreeViewItem;
  21. Begin
  22. TempItem := TTreeViewItem.Create(Self);
  23. TempItem.Text := 'Enter Caption Here';
  24. TempItem.Parent := TreeView;  
  25. End
  26.        
  27. ADOTable.Connection := ADOConnection;
  28.   ADOTable.TableName := 'MenuTree';
  29.  
  30.   ADOTable.Open;
  31.   ADOTable.First;
  32.  
  33.   ADOTable.Filter := '(CHFlag=''CURRENT'') AND (Parent=''Tree'')';
  34.   ADOTable.Filtered := True;
  35.  
  36.   While NOT ADOTable.Eof Do
  37.     Begin
  38.       TempItem := TTreeViewItem.Create(Self);
  39.       TempItem.Text := ADOTable['ItemName'];
  40.       TempItem.Parent := TreeView;
  41.       // TempItem.Free;
  42.  
  43.       ADOTable.Next;
  44.     End;
  45.   TempItem.Free;
  46.   ADOTable.Close;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top