Forum > LCL

TEdit EVENTS interpretation?

(1/1)

Elmug:
Dear forum people,

I have been testing and would appreciate clarify/correct me as follows:

1. OnChange   When even one character of the Text is changed by the user having entered the TEdit box? Therefore if the user uses the backspace key onto the Text each time backspace is pressed, the OnChange event is fired?

2. OnEditingDone   I need help on what constitutes this event, so as not to misguide myself.

Thanks you!

Blaazen:
ad 1) Yes. Each change fires OnChange, incl. Backspace and Delete.
ad 2) OnEditingDone is fired when TEdit looses focus OR when you press Enter; it means when you press Enter and then you set focus to other component (by mouse or by Tab key) OnEditingDone will be fired twice

Elmug:
Good explanation Blazeen.

If there is a link where these details documented, would appreciate it for further study, if you would please provide it.

Thanks for the great help!

Guillermo:
It seems to be a difference in data when OnEditingDone is fired with Enter rather than with Tab or Click, I have put a Tedit and fill it with a file name; when I finished with Enter, the file was not found, but it was when I finished editing with Tab. I coukd not see any difference in the string passed. Any idea of what is happening?

Is it possible to know (in code) the key that fires the event?

Thanks,
Guillermo.

Navigation

[0] Message Index

Go to full version