Bug in TMultiGet:bChange

Bug in TMultiGet:bChange

Postby Enrico Maria Giordano » Fri May 11, 2007 6:11 pm

This is the sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    TEST()

    TEST()

    RETURN NIL


STATIC FUNCTION TEST()

    LOCAL oDlg, oBrw

    USE TEST

    DEFINE DIALOG oDlg

    @ 0, 0 LISTBOX oBrw FIELDS

    @ 4, 0 BUTTON "&Close" ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    CLOSE

    RETURN NIL


If you press Enter you will not hear the beep. But you will hear it if you press Esc.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Bug in TMultiGet:bChange

Postby Enrico Maria Giordano » Fri May 11, 2007 6:12 pm

This seems to solve the Enter problem. From KeyChar() method:

Code: Select all  Expand view
   if nKey == VK_RETURN .and. ;
      lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_WANTRETURN )
      ::oWnd:nLastKey = 0
      if ::bChange != nil
         Eval( ::bChange, nKey, nFlags, Self )
      endif
      return nil
   endif


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: cmsoft and 51 guests