starting in Lazarus lazarus / 9-Editor ---------------------------------------------------------------------- HAPON · 2009-11-20 04:43 ahm i am new in this lazarus, and our instructor gave us a sitwork,we should create a program, a simple one but unfortunately i didn't know the code for "ADD" button, would you help me please!! thanks ---------------------------------------------------------------------- Martin_fr · 2009-11-20 07:39 Depends on what you mean by "add button" ? If you need a button on a Form, you can just use the Form Editor and place it on there. If you need to react to the click, you can go to the "events tab" of the object inspector, and double click the OnClick field (or DoubleClcik the button in the designer) If you need to add the button at runtime: Code: [Select]  var btn : TButton; // or make it a field on the object(form)   // if you do that in a method of the Form,   // then you can use self instead of Form1   btn := TButton.Create(Form1);   btn.parent := Form1;   btn.caption := 'Hello';   btn.Top := 10;   btn.left := 10;   btn.OnClick := @Button1Clicked; ...   procedure TForm1.Button1Clicked(Sender: Tobject);   begin end;