Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 2.00 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5.   uses
  6.     System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  7.     FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, FMX.Layouts, FMX.TreeView;
  8.  
  9.   type
  10.     TTest = class(TTreeViewItem)
  11.  
  12.     end;
  13.  
  14.   type
  15.     TTest2 = class(TTest)
  16.  
  17.     end;
  18.  
  19.   type
  20.     TTest3 = class(TTest2)
  21.  
  22.     end;
  23.  
  24.   type
  25.     TTestLabel = class(TLabel)
  26.  
  27.     end;
  28.  
  29.   type
  30.     TTestLabel2 = class(TTestLabel)
  31.  
  32.     end;
  33.  
  34.   type
  35.     TForm1 = class(TForm)
  36.       TreeView1: TTreeView;
  37.     Panel1: TPanel;
  38.       procedure FormCreate(Sender: TObject);
  39.       private
  40.         { Private declarations }
  41.       public
  42.         { Public declarations }
  43.         testvar1: TTest;
  44.         testvar2: TTest2;
  45.         testvar3: TTest3;
  46.  
  47.         testvar4: TLabel;
  48.         testvar5: TTestLabel;
  49.         testvar6: TTestLabel2;
  50.     end;
  51.  
  52.   var
  53.     Form1: TForm1;
  54.  
  55. implementation
  56.  
  57. {$R *.fmx}
  58.  
  59.   procedure TForm1.FormCreate(Sender: TObject);
  60.     var
  61.       i: Integer;
  62.     begin
  63.       testvar1        := TTest.Create(Form1);
  64.       testvar1.Parent := TreeView1;
  65.       testvar1.Text   := 'TESTing Tree 1';
  66.  
  67.       testvar2        := TTest2.Create(Form1);
  68.       testvar2.Text   := 'TESTing Tree 2 - not working';
  69.       testvar2.Parent := TreeView1;
  70.  
  71.       testvar3        := TTest3.Create(Form1);
  72.       testvar3.Parent := TreeView1;
  73.       testvar3.Text   := 'TESTing Tree 3 - not working';
  74.  
  75.       testvar4        := TLabel.Create(Form1);
  76.       testvar4.Parent := Panel1;
  77.       testvar4.Align  := TAlignLayout.Bottom;
  78.       testvar4.Text   := 'TESTing Label 1';
  79.  
  80.       testvar5        := TTestLabel.Create(Form1);
  81.       testvar5.Parent := Panel1;
  82.       testvar4.Align  := TAlignLayout.Bottom;
  83.       testvar5.Text   := 'TESTing Label 2';
  84.  
  85.       testvar6        := TTestLabel2.Create(Form1);
  86.       testvar6.Parent := Panel1;
  87.       testvar4.Align  := TAlignLayout.Bottom;
  88.       testvar6.Text   := 'TESTing Label 3 - not working';
  89.  
  90.     end;
  91.  
  92. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement