'OnDeactivate does not fire for a docked dialog in Delphi
I have a dockable floating dialog. It shows the properties of the selected elements of the main window. The user can modify this values and if press [enter] or leave the TEdit, after validation the value set on the selected element. It works fine when the user click one component to another in the dialog or select another element on the main window if the dialog floats. I store the focused TEdit by theire onEnter/onExit event handlers and the form onDeactivate simulates an [enter] press on the focused TEdit if it is not NIL. (onEnter called, but onExit not yet). However when the dialog is docked, the onDeactivate does not call and the modified value lost. How can I sense the edit lost the focus by the user clicked on the main window? As I read a docked dialog no longer a real dialog and onActivate/onDeactivate does not fire for them. Any built in solution without any (more) hack? I mean any other event to catch or something like this. I dont want to write code into the main window to check wether the docked dialog... It is not the responsibility of the main window.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
