Thanks a lot for your help,
for the sake of other people willing in reproducing this item, please find below the working code:
//##################################################################################################
// Field protection and Checkbox section
// Checkbox to add "DECT" in two fields at once EditCisco Form
procedure AddInfo_CheckBox1_OnMouseUp (Sender: string; MouseLeft, MouseRight, MouseMiddle: boolean; Shift, Alt, Ctrl: boolean; X, Y: Integer);
begin
if AddInfo.CheckBox1.Checked then
begin
if not AddInfo.AddTK.ReadOnly then
begin
AddInfo.AddTK.Text:='DECT';
AddInfo.AddPF.Text :='DECT';
end;
end;
end;
// Check if fields PF is empty or not for the checkbox, if not empty then read-only AddInfo Form
procedure AddInfo_AddPF_OnChange (Sender: string);
begin
if (AddInfo.AddTK.Text='DECT') and (AddInfo.AddPF.Text='DECT') then AddInfo.CheckBox1.Checked:=True else AddInfo.CheckBox1.Checked:=False;
end;
// Check if fields TK is empty or not for the checkbox, if not empty then read-only AddInfo Form
procedure AddInfo_AddTK_OnChange (Sender: string);
begin
if (AddInfo.AddTK.Text='DECT') and (AddInfo.AddPF.Text='DECT') then AddInfo.CheckBox1.Checked:=True else AddInfo.CheckBox1.Checked:=False;
end;
// Protect fields PF and TK when not empty, if not empty then read-only AddInfo Form
procedure AddInfo_OnShow (Sender: string; Action: string);
begin
if AddInfo.AddPos.Text<>'' then AddInfo.AddPos.ReadOnly := True else AddInfo.AddPos.ReadOnly := False;
if AddInfo.AddTK.Text<>'' then AddInfo.AddTK.ReadOnly := True else AddInfo.AddTK.ReadOnly := False;
sLastActionForm := Action; // variable for edit/add logging
end;