السلام عليكم
ماذا لو ادخلت شرط
يلغي تفعيل العنصر combobox
لو لم يتم الادخال على عنصر Edit
المثال
ماذا لو ادخلت شرط
يلغي تفعيل العنصر combobox
لو لم يتم الادخال على عنصر Edit
المثال
كود :
procedure TForm1.Button1Click(Sender: TObject);
begin
if edit1.text='' then
label2.visible:=true
else
label2.visible:=false;
if edit1.text=''then
ShowMessage('Field N°. 1 [ Disable ]');
if edit1.text=''then
ComboBox1.enabled:=false
else
ComboBox1.enabled:=true;
if ComboBox1.enabled=true then
ComboBox1.Items.Add(Edit1.Text);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
application.Terminate;
end;
