Page 1 of 1

MEMO and ENTER KEY

Posted: Tue Apr 08, 2008 5:07 pm
by Otto
Could someone please help me.
I can’t get ENTER key working in the memo filed.
What do I miss.
Thanks in advance
Otto

Code: Select all


prg file
#INCLUDE "FiveWin.ch"

function Main()
   local oDlg, oText, cText := ""
   DEFINE DIALOG oDlg RESOURCE "Test"
   REDEFINE GET oText VAR cText MULTILINE ID 102 OF oDlg UPDATE
   ACTIVATE DIALOG oDlg CENTERED
return nil





rc-file

TEST DIALOG 61, 39, 194, 119
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Testing Memo"
FONT 8, "Tahoma"
BEGIN
        CONTROL "", 102, "EDIT", ES_LEFT | ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL, 45, 31, 102, 51
END



Re: MEMO and ENTER KEY

Posted: Tue Apr 08, 2008 5:40 pm
by Richard Chidiak
Otto

if you are using worksho check "want return" in win 3.1 styles

if not add ES_WANTRETURN to your rc file

HTH

Richard

Posted: Tue Apr 08, 2008 5:42 pm
by ermatica
I do well:

.prg

Code: Select all

 REDEFINE GET oTextMemo  VAR mTextMemo  MEMO ID 104 OF oDlg UPDATE  //Observaciones
.RC

Code: Select all

CONTROL "", 4009, "Edit", ES_MULTILINE|ES_AUTOHSCROLL|WS_HSCROLL|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 8, 168, 608, 96
Is that?

Posted: Tue Apr 08, 2008 6:05 pm
by Otto
Hello Richard,
thank you for your help. Now with ES_WANTRETURN it is working.

Ermatica, I have exactly the same code as
you. This code is working in some applications for me but not
in my test.prg which I posted.

Thank you again for your help.
Regards,
Otto