MEMO and ENTER KEY

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

MEMO and ENTER KEY

Post 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


User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: MEMO and ENTER KEY

Post 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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
ermatica
Posts: 44
Joined: Mon Nov 12, 2007 1:50 pm
Location: España

Post 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?
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post 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
Post Reply