Board index » cppbuilder » Esc doesn't work when focus on TMemo

Esc doesn't work when focus on TMemo


2004-02-11 10:57:59 PM
cppbuilder58
Hi,
when TMemo has focus in dialog and I press Escape then
dialog does not close (though there is a button with Cancel property
set to true).
How to overcome this?
Thank you for any advice,
Alexander
 
 

Re:Esc doesn't work when focus on TMemo

Hi Alexander Aliev
In article < XXXX@XXXXX.COM >, Alexander Aliev says :
Quote
Hi,

when TMemo has focus in dialog and I press Escape then
dialog does not close (though there is a button with Cancel property
set to true).

How to overcome this?
Maybe You can set keypreview to true on the form and then
catch esc and close the form.
Best regards
Asger
 

Re:Esc doesn't work when focus on TMemo

Hi, Asger,
Quote
>when TMemo has focus in dialog and I press Escape then
>dialog does not close (though there is a button with Cancel property set
to true).
>

Maybe You can set keypreview to true on the form and then
catch esc and close the form.
this works, but TMemo in my case is a member of the frame.
I'd like to put this frame in needed form without additional
changes for that form every time.
Is there another way?
Regards,
Alexander
 

{smallsort}