(1)Delphi帮助中的这段代码中的messagedlg是不是多了个mbYes?
procedure TForm1.Button1Click(Sender: TObject);begin
  if MessageDlg('Welcome to my Delphi application.  Exit now?',
    mtConfirmation, [mbYes, mbNo], 0, mbYes) = mrYes then
  begin
    MessageDlg('Exiting the Delphi application.', mtInformation,
      [mbOk], 0, mbOk);
    Close;
  end;end;
(2)如何在DBComboBox选择不同的Item后让Button.enabled:=false?
用DBComboBox的OnDropDown事件不行,它在点击后就执行Button.enabled:=false,而不判断选择的item与数据库中的项是否不同.

解决方案 »

  1.   

    1.你把mbok换成1,看看效果是不是一样?
    2。onchange,case itemindex of
      

  2.   

    1……
    2、在他的DataSource的SateChange里面写,应该可以
      

  3.   

    (1)Delphi帮助中的这段代码中的messagedlg是多了个mbYes
    procedure TForm1.Button1Click(Sender: TObject);begin
      if MessageDlg('Welcome to my Delphi application.  Exit now?',
        mtConfirmation, [mbYes, mbNo], 0) = mrYes then
      begin
        MessageDlg('Exiting the Delphi application.', mtInformation,
          [mbOk], 0);
        Close;
      end;end;
    (2)在DBComboBox的onchange事件中来判断
      

  4.   

    在DBComboBox的onchange事件中来判断: if DBComboBox.text = 'SB' then button1.enabled:=False;
      

  5.   

    TO:没完没了
    1.你把mbok换成1,看看效果是不是一样?
    怎么换?写得清楚些啊