TMultiGet [Solved]

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

TMultiGet [Solved]

Post by Enrico Maria Giordano »

In the following sample you will notice that the Enter key doesn't fire the ON CHANGE clause:

Code: Select all

#include "Fivewin.ch"


REQUEST HB_GT_GUI_DEFAULT


FUNCTION MAIN()

    LOCAL oDlg, oGet

    LOCAL cVar := ""

    DEFINE DIALOG oDlg

    @ 0, 0 GET oGet VAR cVar MEMO;
           SIZE 100, 30;
           ON CHANGE TONE( 440, 1 )

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

    ACTIVATE DIALOG oDlg;
             CENTER

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

Re: Bug in TMultiGet

Post by Enrico Maria Giordano »

A possible fix in KeyChar() method:

Code: Select all

   if nKey == VK_RETURN .and. ;
      lAnd( GetWindowLong( ::hWnd, GWL_STYLE ), ES_WANTRETURN )
      ::oWnd:nLastKey = 0
      if ::bChange != nil  // EMG
         Eval( ::bChange, nKey, nFlags, Self )  // EMG
      endif  // EMG
      return nil
   endif
EMG
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Enrico, is this only an error on veriosn 8.05?
Thanks in advance
Otto
Post Reply