Hi,
I try the ShowMessage solution. I'm afraid it doesn't work. With ShowMessage: now have two extra server events, the event sequence is
1 UniEdit1Enter
2 UniEdit1Exit (this event server now executes a ShowMessage and sets the focus on UniEdit1 again, but this effect is not shown until event 5)
3 UniEdit2Enter
4 UniEdit2Exit
5 UniEdit1Enter (caused by event 2. Here, the ShowMessage displays the message)
6 UniEdit1Exit (caused after closing the ShowMessage)
7 UniEdit1Enter
¿Any idea?...
¿It's possible to implement something simple like the following in the base class of UniGUI controls?:
Each form should have an actual focused property and a flag:
* if the flag is OFF, actual focused property changes with each control focus change, otherwise it remains unchanged
* if the flag is ON, only server events related with the active focused control should be processed if those events are ENTER, EXIT, KEYBOARD or MOUSE events (¿other events for other controls could be processed, like CHANGE events?)
* if the flag is ON, it must be turned off automatically, if we are focusing in the actual focused control.
This should work for both web and VCL modes. This way, the original sequence will work as following (if no control fires the flag, everything will work as it is doing now, so no one has to change his code):
1 UniEdit1Enter (the flag is OFF, so base control sets the active focused property of the form to UniEdit1)
2 UniEdit1Exit (programmer sets manually the flag ON so the actual focused property from now on could not change)
3 UniEdit2Enter (the flag is ON and UniEdit2 is not the focused control. It is a KEYBOARD, MOUSE, ENTER or EXIT event, so this event will be ignored)
4 UniEdit2Exit (the same as prior)
5 UniEdit1Enter (the flag is ON and actual focused control is the one, so base class resets the flag)
In this manner, in web mode the effective events are only 1, 2 and 5, similar to the 3 events sequence of VCL mode.
This way, it is semi-transparent, so the programmer only has to set ON the flag in EXIT events only if needed, since its reset is automatic, regardless if he is programming in web or VCL mode.
¿It's possible to include this logic?
Thank you in advance.