界面上有一个员工列表
用户选择一名员工,则他的详细信息出现在各个对应的
edit,combobox,或checkbox上。
这是Save Button是disabled
当用户一改动任何一项
save button 就应该enabled
这个如何实现谢谢各位了

解决方案 »

  1.   

    在table的onedit、onmodify等事件中enabled
      

  2.   

    在dataset中拦截onedit事件, 
    前提是界面上用的是数据感知组件
      

  3.   

    在datasource 的onchange事件中写代码吧
    if (Datasource1.state=dsEdit) or (Datasource1.state=dsInsert) then
    button1.enable:=true
    else
     button1.enable:=false;
      

  4.   

    在edit的KeyPress, KeyDown, Keyup, Change
      combobox 的Select, Click, Change.
      Checkbox 的Click這些事件上實現. breezing(网上的小鱼)說的只有在edit,combobox,checkbox關聯到數據庫的時候才會激發這些事件.
      

  5.   

    用standard页上的actionlist,一行代码都不用写了
    1,拽一个actionlist下来,双击它,在弹出的编辑窗口中,点右键,选new standard action,然后选择dataset中的Tdatasetpost
    2,放个按钮,设置按钮的action属性为DataSetPost1一切就ok了
      

  6.   

    edit,combobox,或checkbox 再着几个控件的 onchange事件中写!
      

  7.   

    在可编辑控件的事件中几个KeyUP,KeyPress,KeyDown事件添加语句
     SaveButton.enable:=true;
      

  8.   

    谢谢大家回帖,目前为止,我以为 killlaoli(菜鸟) 的回答最好
    大家以为呢?
      

  9.   

    可以吗?可以实现吗?怎么和edit,combobox等关联的呢?
      

  10.   

    re idilent(说错了别怪我) :
    用dbedit,用datasource关联