Solved

DBMemo and the dead Return key

Posted on 1997-08-18
2
472 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now