本文介绍了如何从当前关注的组件中移除焦点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个DB组件,当它接收到CM_EXIT消息时,将调用DataLink.UpdateRecord。失去焦点时将发送此消息。当我单击发布按钮时,它不会失去焦点,并且价值也不会写入数据源。
I have a DB component which DataLink.UpdateRecord is called when it receives CM_EXIT message. This message is sent when it loses focus. When I click post button, it doesn't lose focus and value is not written to datasource. How can I reach an effect of component losing focus without switching it to other one?
推荐答案
您可以使用:
procedure TCustomForm.DefocusControl(Control: TWinControl; Removing: Boolean);
这篇关于如何从当前关注的组件中移除焦点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!