ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to detect Enter/Return Key in Memo
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

yogiyang

India
727 Posts

Posted - Jul 07 2016 :  04:26:36  Show Profile  Reply
Hello,

I am using following to allow user to Add Memo annotation to ImageEnVect.
ImageEnVect1.MouseInteractVt:=[miPutMemo];

Now I want to detect as to which Enter the user has pressed while editing text.

What I want to do is if the user pressed the Num Pad Enter key ImageEnVect should exit from Memo Editing mode and switch to selection mode.

TIA


Yogi Yang

xequte

38615 Posts

Posted - Jul 07 2016 :  20:17:59  Show Profile  Reply
Hi Yogi

You can use the OnTextKeyDown event:

http://www.imageen.com/help/TImageEnVect.OnTextKeyDown.html

For example:

procedure TMainForm.ImageEnVect1TextKeyDown(Sender: TObject; var Key: Word;
    Shift: TShiftState);
begin
  // Make the Enter key cancel text input
  if Key = VK_Return then
  begin
    Key := 0;
    ImageEnVect1.CancelInteracts;
  end;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: