Abaksoft Posted January 13, 2016 Posted January 13, 2016 Hello When an uniMemo get focus, i want the Enter key (13) be disable to have the classical behavior in unimemo (Carridge Return). So, How to disable NavigateKeys when an unimemo get the focus and enable it after lost focus ? (on runtime) Thx. Quote
Sherzod Posted January 14, 2016 Posted January 14, 2016 Hi! I'm sorry, Can you clarify some moments, you want to cancel entering a carriage return, or want to replace carriage return code... ?! Best regards. Quote
Abaksoft Posted January 14, 2016 Author Posted January 14, 2016 Hello DD, Thx OK, 1. in a form, you have an (in order) : UniEdit1 UniEdit2 UniMemo1 UniEdit3 2. You define NavigateKeys enabled=True; (Next = Key=13) 3. Then if i am on UniEdit1 then press Enter, the focus go to UniEdit2, then to UniMemo1, then to UniEdit3. This is the correct behavior with this setting (NavigateKeys). 4. But what i want : when UniMemo1 set focus, I want the Enter Key becomes as classical VCL behavior (carriage return inside the UniMemo1). 5. After exit UniMemo1, the NavigateKeys (Next = 13) retreive the initial behavior (as 2). Thx. Quote
Sherzod Posted January 14, 2016 Posted January 14, 2016 Hi, Sorry, now it's clear,, For now try, can help: UniMemo1 -> ClientEvents -> ExtEvents ... add keydown fn: function keydown(sender, e, eOpts) { if (e.getKey() == e.ENTER) { e.stopPropagation(); } } Best regards. 3 Quote
Abaksoft Posted January 14, 2016 Author Posted January 14, 2016 Oh... BRAVO; BRAVO; BRAVO Thank you DD Quote
TI.ME Posted December 9, 2019 Posted December 9, 2019 On 1/14/2016 at 7:59 AM, Sherzod said: Hi, Sorry, now it's clear,, For now try, can help: UniMemo1 -> ClientEvents -> ExtEvents ... add keydown fn: function keydown(sender, e, eOpts) { if (e.getKey() == e.ENTER) { e.stopPropagation(); } } Best regards. Did not work ... Can you help me?? Quote
Sherzod Posted December 9, 2019 Posted December 9, 2019 19 minutes ago, TI.ME said: Did not work ... Can you help me?? Hello, Are you still using trial edition? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.