Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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.

  • Upvote 3
  • 3 years later...
Posted
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??

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...