Changeset 7 for os/trunk/Applications
- Timestamp:
- Jun 2, 2013, 6:59:07 PM (12 years ago)
- Location:
- os/trunk/Applications
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
os/trunk/Applications/TestApplication.pas
r6 r7 32 32 Caption := 'TestApp'; 33 33 Form1 := TForm.Create; 34 Form1.Owner := Self; 34 35 Form1.Bounds := TRectangle.Create(50, 80, 200, 120); 35 36 Form1.Name := 'Form1'; … … 37 38 Form1.Screen := Screen; 38 39 Form2 := TForm.Create; 40 Form2.Owner := Self; 39 41 Form2.Bounds := TRectangle.Create(350, 150, 200, 150); 40 42 Form2.Name := 'Form2'; … … 47 49 Button := TButton.Create; 48 50 Button.Parent := Form1; 51 Button.Owner := Form1; 49 52 Button.Bounds := TRectangle.Create(50, 50, 60, 24); 50 53 Button.Visible := True; … … 54 57 Label1 := TLabel.Create; 55 58 Label1.Parent := Form1; 59 Label1.Owner := Form1; 56 60 Label1.Bounds := TRectangle.Create(60, 80, 60, 24); 57 61 Label1.Visible := True; -
os/trunk/Applications/UDesktop.pas
r6 r7 12 12 procedure TaskButtonClick(Sender: TObject); 13 13 protected 14 function HandleMessage(Message: TMessage): Boolean; override;15 14 public 16 15 MenuButton: TButton; … … 18 17 TaskBar: TPanel; 19 18 TestApp: TApplication; 20 TaskButtons: TList<TButton>; 19 TaskButtons: TObjectList<TButton>; 20 function HandleMessage(Message: TMessage): Boolean; override; 21 21 procedure Run; override; 22 22 constructor Create; override; … … 56 56 begin 57 57 inherited; 58 TaskButtons := T List<TButton>.Create;58 TaskButtons := TObjectList<TButton>.Create; 59 59 end; 60 60 … … 67 67 function TDesktopApp.HandleMessage(Message: TMessage): Boolean; 68 68 begin 69 if (Message is TMessageResize) or (Message is TMessageTaskList) then 69 if (Message is TMessageResize) or (Message is TMessageTaskList) then begin 70 70 UpdateTaskBar; 71 Result := True; 72 end else Result := False; 71 73 end; 72 74 … … 76 78 Caption := 'Desktop'; 77 79 MainBar := TForm.Create; 80 MainBar.Owner := Self; 78 81 MainBar.BorderStyle := bsNone; 79 82 MainBar.Name := 'MainBar'; … … 82 85 TaskBar := TPanel.Create; 83 86 TaskBar.Parent := MainBar; 87 TaskBar.Owner := MainBar; 84 88 TaskBar.Name := 'TaskBar'; 85 89 TaskBar.Color := clLightGreen; … … 89 93 MenuButton := TButton.Create; 90 94 MenuButton.Parent := TaskBar; 95 MenuButton.Owner := TaskBar; 91 96 MenuButton.Bounds := TRectangle.Create(0, 0, 50, 24); 92 97 MenuButton.Visible := True;
Note:
See TracChangeset
for help on using the changeset viewer.