Newbie question about TMemo
From: Alan Mead (cubrewer_at_yahoo.com)
Date: 11/19/04
- Next message: Ekkehard Domning: "Re: Initializing com-ports in XP, 2000 & NT"
- Previous message: Rob Kennedy: "Re: Exceptions, and try...finally"
- Next in thread: Bruce Roberts: "Re: Newbie question about TMemo"
- Reply: Bruce Roberts: "Re: Newbie question about TMemo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Ekkehard Domning: "Re: Initializing com-ports in XP, 2000 & NT"
- Previous message: Rob Kennedy: "Re: Exceptions, and try...finally"
- Next in thread: Bruce Roberts: "Re: Newbie question about TMemo"
- Reply: Bruce Roberts: "Re: Newbie question about TMemo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|