Solved

DBMemo and the dead Return key

Posted on 1997-08-18
2
485 Views
Last Modified: 2012-05-05
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
Comment
Question by:lbrowning
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
fsanchez earned 50 total points
ID: 1341795
Try using the property WantReturns. It is published for TMemo, but not fot TDBMemo.
0
 

Author Comment

by:lbrowning
ID: 1341796
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question