Press Enter in a Memo Field

Post Reply
Ollie
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Press Enter in a Memo Field

Post by Ollie »

How can I use Enter (to get a new line) in a memo field?

When I press Enter, it presses my (DEFAULT) "OK" button. (Which is fine, but can I use Shift-Enter or something to get a new line? How?)

Thanks in advance.
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

Ollie:

If you are creating the memo from resources, double click on it, open properties window and select WANT RETURN to activate de feature.
Saludos
R.F.
Ollie
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Post by Ollie »

Super. Thank you very much.
Many thanks
Ollie.

Using:
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)
Borland C++ 5.5.1
FWH 9.04 (2009 Apr)
JoseLuis
Posts: 359
Joined: Thu Oct 19, 2006 12:28 pm
Location: Toledo

Post by JoseLuis »

También puedes hacer:
El get del campo memo es el siguiente:

Code: Select all

    REDEFINE GET ocomen VAR ccomentario MEMO ID 113 OF oDlg
Y ahora le dices que cuando pulses Enter, que salte al objeto siguiente:

Code: Select all

    ocomen:bKeyDown := { | nKey, nFlags | iif(nkey==13,ocodcon:Setfocus(),)}
Saludos

Jose Luis
Post Reply