FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to oDlg:End() in GET MEMO by press escape?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to oDlg:End() in GET MEMO by press escape?
Posted: Sat Mar 22, 2008 11:34 PM
Dear All,

I would like to :End() Dialog with Escape Key in GET MEMO. This code doesn't work. How can I do it?

  DEFINE DIALOG oDlgs FROM  0, 0 TO 24+200, 390 TITLE 'Test' ;
              PIXEL FONT oFnts

              oDlgs:lHelpIcon := .F.
              
       	@  0, 0  GET oGet VAR cPosItem SIZE 195, 102 PIXEL ;
		MEMO OF oDlgs 
       		
     oGet:bGotFocus  := {|| (oGet:SetPos(0))}		
     oGet:bKeyDown := {||nKey| iif(nKey=VK_ESCAPE, oDlgs:End(), ) }
              
       ACTIVATE DIALOG oDlgs ON INIT (oDlgs:Move( 335,  85 )) NOWAIT RESIZE16

Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
How to oDlg:End() in GET MEMO by press escape?
Posted: Sun Mar 23, 2008 07:59 AM

oGet:nDlgCode:= DLGC_WANTALLKEYS

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to oDlg:End() in GET MEMO by press escape?
Posted: Sun Mar 23, 2008 08:58 AM
dutch wrote:Dear All,

I would like to :End() Dialog with Escape Key in GET MEMO.


You don't need any additional code as that's the default behavior. Ie: you don't need of

dutch wrote:
oGet:bKeyDown := {||nKey| iif(nKey=VK_ESCAPE, oDlgs:End(), ) }


By the way, there is a little typo in the above code:

{||nKey|


shold be

{|nKey|


EMG
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to oDlg:End() in GET MEMO by press escape?
Posted: Sun Mar 23, 2008 10:42 AM

Thanks Enrico,

I saw it. :oops:

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion