Bug in TGet [Fixed]

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

Bug in TGet [Fixed]

Post by Enrico Maria Giordano »

In the following sample, please change the number and press TAB. The new number doesn't properly align to right.

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cCli := 23

    DEFINE DIALOG oDlg

    @ 1, 1 GET cCli SIZE 100, 13 RIGHT

    @ 3, 1 BUTTON "Chiudi";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg

    RETURN NIL
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Bug in TGet

Post by Antonio Linares »

Enrico,

This seems as a valid temporary solution:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oGet

    LOCAL cCli := 23

    DEFINE DIALOG oDlg

    @ 1, 1 GET oGet VAR cCli SIZE 100, 13 RIGHT ;
       VALID ( oGet:Refresh(), .T. ) 

    @ 3, 1 BUTTON "Chiudi";
           ACTION oDlg:End()

    ACTIVATE DIALOG oDlg

    RETURN NIL
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Bug in TGet

Post by Enrico Maria Giordano »

Thank you. It's not something that I need to use. I only noticed this problem and reported here. :-)

EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Bug in TGet

Post by Antonio Linares »

Enrico,

Please add these lines at the end of Class TGet Method KeyChar()

Code: Select all

  #ifndef __CLIPPER__
               if nKey == VK_RETURN  // Execute DEFPUSHBUTTON Action
                  ::Super:KeyChar( nKey, nFlags )
               endif
           #endif

           if lAnd( ::nStyle, ES_RIGHT )  // new
              ::Refresh()                 // new
           endif                          // new 

           return 0
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Bug in TGet

Post by Antonio Linares »

Changes included in FWH 17.05

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply