[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 499
  • Last Modified:

DBMemo and the dead Return key

Delphi has been easy for me to learn so far. But I seem to be stuck with what seems to me a very simple problem.  I cannot seem to get a DBMemo control to allow using the Enter key to go to a new line within the memo.  When I hit the enter key I get no response.  I have noticed that when I hit Ctrl+Enter it does got to a new line.  Events OnKeyPress, and OnKeyDown do not capture the Enter key, but OnKeyUp does.  How can I make this work?  If
I capture the Enter key in the OnKeyUp event how would I make it go to a new line?  Is there a property or flag that can be set somewhere that changes this behavior?
  This seems to me like a function that should work without any coding. It lets you do wordwrap by simply setting a property, why is hitting enter to go to a new line so damn hard? I have worked on this for 2 days and have
gotten nowhere.

Thanks for your help,

Frustrated newbie

PS This is Delphi 1.0 (Application must run on Win 3.1)

0
lbrowning
Asked:
lbrowning
1 Solution
 
fsanchezCommented:
Try using the property WantReturns. It is published for TMemo, but not fot TDBMemo.
0
 
lbrowningAuthor Commented:
I tried using the TMemo setting the WantReturns to true instead of the TDBMemo as you suggested, but it didn't work.  I also have the KeyPreview on the form set on as many others have suggested.  Do you have any other ideas?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now