Execute multiple things with 1 checkbox lazarus / 67-Windows ---------------------------------------------------------------------- lulZghost · 2017-04-27 17:09 Hi, I just started with Lazarus some Days ago and still test with the program. I make something basic (we also have at school) but extend it a bit. I make a checkbox, that enable and disable the TEdit1. But I want to do multiple things with this one checkbox. It worked with one command fine, but I dont know how to add another one. I tryed many things, search the web, but find nothing. I know for you it might be simple, but I just started and am stuck right now. Please help me :D ---------------------------------------------------------------------- Kujo · 2017-04-27 17:22 Hi, if you have more than one command to use with if, while, repeat, for, with, you must use begin..end, that represents a block of instructions if CheckBox1.Checked then begin   edit1.Enabled := False;   edit1.Caption := 'This row is temporary disabled'; end else   edit1.Enabled := True; P.S. you can use begin..end also after "else": if ..... then begin   ... end else begin   .... end; ---------------------------------------------------------------------- Handoko · 2017-04-27 17:30 Hello lulZghost and Kujo, Welcome to this forum. @lulZghost If you do what Kujo said, your code should work correctly. Also, properly indent your code (as what Kujo did) will make your code easier to read and debug. Usually we use 2 spaces to start a new block. Have fun! ---------------------------------------------------------------------- FTurtle · 2017-04-27 20:14 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i implementation uses strutils; {$R *.lfm} { TForm1 } procedure TForm1.CheckBox1Change(Sender: TObject);begin  Edit1.Enabled := not CheckBox1.Checked;  Edit1.Text := IfThen(CheckBox1.Checked, 'This row is temporary disabled', '');  // uses strutilsend;