Press Enter in a Memo Field

Press Enter in a Memo Field

Postby Ollie » Wed Jul 11, 2007 1:10 pm

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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby R.F. » Wed Jul 11, 2007 4:25 pm

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.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Postby Ollie » Thu Jul 12, 2007 6:30 am

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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby JoseLuis » Thu Jul 12, 2007 6:52 am

También puedes hacer:
El get del campo memo es el siguiente:
Code: Select all  Expand view
    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  Expand view
    ocomen:bKeyDown := { | nKey, nFlags | iif(nkey==13,ocodcon:Setfocus(),)}


Saludos

Jose Luis
JoseLuis
 
Posts: 426
Joined: Thu Oct 19, 2006 12:28 pm
Location: Toledo


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 97 guests