Newbie question about TMemo

From: Alan Mead (cubrewer_at_yahoo.com)
Date: 11/19/04


Date: 19 Nov 2004 09:09:04 -0800

I'd like the Memo control on my app to act like the IE Address bar..
when it gains focus, it selects all it's text (to make it easy to
change the URL) but then if you click into the selection, it inserts
the cursor where you select. When the user presses control-a the
entire field is selected. I'm having two problems:

Using Delphi 7, when I slap a memo on a form I can get the Control-a
behavior by pressing Control-Shift-a but Ctrl-a doesn't work. When I
insert a KeyPress event to catch Ctrl-a, I cannot because the key
seems to always be a capital [I put "ShowMessage(IntToStr(Key));" into
the event handler and 'a' has a key code of 65--Ord('A')--rather than
97.].

When I insert an OnEnter event containing just "Memo1.SelectAll;" then
when I click into the memo, all the text is selected for a fraction of
a second and then the selection disappears and the cursor is placed
where I clicked.

I'll appreciate any help,

-Alan



Relevant Pages

  • Re: multi line combo boxes
    ... I was afraid of that (I didn;t notice that it only allowd 255 characters ... >> In Access 2003 I have created a combo box that is linked to a memo ... > the selection you are only getting the first 255 characters from your memo ... > You can use DLookupto retrieve the full Memo field into another TextBox after ...
    (microsoft.public.access.forms)
  • Re: How to convert/copy memo field to text ?
    ... suppose I have a select statement and am selecting desc which is memo ... can I use do while in the select statement in SQL2K to read all the ... > convert VFP memo type to SQL text type. ... >> this selection and copy to excel file. ...
    (microsoft.public.sqlserver.programming)
  • Re: multi line combo boxes
    ... bumpmobile wrote: ... > In Access 2003 I have created a combo box that is linked to a memo ... the selection you are only getting the first 255 characters from your memo ... You can use DLookupto retrieve the full Memo field into another TextBox after ...
    (microsoft.public.access.forms)
  • How do I print ONLY the first page of a 10 page memo?
    ... memo. ... The only selection in the printing page options are ... This problem cannot be fixed by defining or creating ... the print style menu. ...
    (microsoft.public.outlook.general)