The
radio button etc loses focus due to the message dialog being displayed (in
effect the click is lost).
Your
best bet would be to post a message instead on the TEdit.OnExit, and the message
handler for that to then display the message dialog. This may fix your
problem.
Myles.
I posted this problem yesterday but got no
response so I have attempted to explain it better.
I have a D6 application.
When I move out of a TEdit by clicking on a
TRadioButton or TCheckBox, the OnExit code for the TEdit executes and the
focus moves to the TRadioButton or TCheckBox but the OnClick event for the
TRadioButton or TCheckBox does not execute - the button initially appears
grayed, but reverts to the normal colour and remains unchecked as soon as the
mouse is moved. To make the TRadioButton or TCheckBox checked you need to
click it a second time - even if you want to close the form you need to click
the close button twice.
The problem only arises when the OnExit event
from the TEdit displays a MessageDlg - there is no problem if the MessageDlg
does not get displayed, so I suspect the problem lies with
MessageDlg.
I have tried putting Application.ProcessMessages
and forcing a click using SendMessage in various places without
success.
Anyone got any ideas on how to fix this
problem?
Regards
Steve
Galyer
|