public void setEditable(final boolean enabled)
{
if (!enabled)
{
_bitmap = _disabledBitmap;
}
if (enabled)
{
_bitmap = _noFocusBitmap;
}
invalidate();
super.setEditable(enabled);
}
我使用OS6中的方法setEnabled(boolean flag)
它运行正常。但它在OS-5中不支持,在Os5中我尝试使用setEditable(boolean flag)
但不起作用。请帮助..
提前多多感谢...
答案 0 :(得分:1)
我使用以下代码启用/禁用按钮
//when you dont want control of button field use
_buttonField.setChangeListener(null);
//when you want control of button field use
_buttonField.setChangeListener(<your change listener>);
//if you want to remove button from manager use
manager.delete(_buttonField);
//if you want to add button to manager use
manager.add(_buttonField);