PICTURE "@Z"

PICTURE "@Z"

Postby laritelecom » Fri Dec 27, 2019 3:55 pm

Hello friends,

in Clipper I could use @Z in the PICTURE command to have empty field if value is 0.

It seems that in Fivewin it doesn't work. I'm doing something wrong ?

How do you set empty field if value in a GET is 0 ?

Thank you
laritelecom
 
Posts: 1
Joined: Fri Nov 08, 2019 3:51 pm

Re: PICTURE "@Z"

Postby Armando » Fri Dec 27, 2019 4:07 pm

laritelecom:

I do this way and it's fine

Code: Select all  Expand view

"@Z 999,999,999,999.99"
 


Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3176
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: PICTURE "@Z"

Postby Enrico Maria Giordano » Fri Dec 27, 2019 6:33 pm

I confirm the problem. This is a sample:

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


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVr1 := 0
    LOCAL cVr2 := 0

    DEFINE DIALOG oDlg

    @ 1, 1 GET cVr1;
           PICTURE "@EZ 9.999,99"

    @ 3, 1 GET cVr2;
           PICTURE "@EZ 9.999,99"

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


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

Re: PICTURE "@Z"

Postby nageswaragunupudi » Sun Dec 29, 2019 1:33 pm

Yes.
We are looking into this.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: PICTURE "@Z"

Postby nageswaragunupudi » Thu Jan 02, 2020 3:27 pm

Fixed in FWH2001
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: PICTURE "@Z"

Postby karinha » Thu Jan 02, 2020 5:36 pm

I always do as Armando indicates and it works well.

Code: Select all  Expand view

#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVr1 := 0
    LOCAL cVr2 := 0
    LOCAL aGet := ARRAY(5)

    DEFINE DIALOG oDlg

    @ 1, 1 GET aGet[1] VAR cVr1 PICTURE "@Z 9,999,999.99"  SIZE 50,12 OF oDlg

    @ 3, 1 GET aGet[2] VAR cVr2 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg

    ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7607
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: PICTURE "@Z"

Postby nageswaragunupudi » Fri Jan 03, 2020 4:03 am

The standard behaviour of Clipper and (x)Harbour without FWH is that "0.00" is displayed only in the Get having focus. Gets not having focus display blanks only and not digits. But FWH till version 19.12 displays "0.00" in all Gets whether having focus or not. This is fixed in 20.01. Now the behaviour of FWH matches the behaviour of Clipper/(x)Harbour.

For testing we use this program for DOS.
Code: Select all  Expand view

MEMVAR GetList

FUNCTION MAIN()

    LOCAL cVr1 := 0
    LOCAL cVr2 := 0
    LOCAL cVr3 := 0

    CLEAR

    @ 1, 1 GET cVr1 PICTURE "@EZ 9,999,999.99"
    @ 3, 1 GET cVr2 PICTURE "@EZ 9,999,999.99"
    @ 5, 1 GET cVr3 PICTURE "@EZ 9,999,999.99"

    READ

RETURN NIL
 


and this program for FWH
Code: Select all  Expand view

#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVr1 := 0
    LOCAL cVr2 := 0
    LOCAL cVr3 := 0

    SetGetColorFocus()

    DEFINE DIALOG oDlg TITLE FWVERSION

    @ 1,   1 GET cVr1 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg RIGHT
    @ 2.5, 1 GET cVr2 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg RIGHT
    @ 4,   1 GET cVr3 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg RIGHT

    ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 


In this GIF, you will find that FWH20.01 behaves like Clipper/(x)Harbour but not FWH1912.

Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: PICTURE "@Z"

Postby wartiaga » Fri Jan 03, 2020 4:42 pm

nageswaragunupudi wrote:The standard behaviour of Clipper and (x)Harbour without FWH is that "0.00" is displayed only in the Get having focus. Gets not having focus display blanks only and not digits. But FWH till version 19.12 displays "0.00" in all Gets whether having focus or not. This is fixed in 20.01. Now the behaviour of FWH matches the behaviour of Clipper/(x)Harbour.

For testing we use this program for DOS.
Code: Select all  Expand view

MEMVAR GetList

FUNCTION MAIN()

    LOCAL cVr1 := 0
    LOCAL cVr2 := 0
    LOCAL cVr3 := 0

    CLEAR

    @ 1, 1 GET cVr1 PICTURE "@EZ 9,999,999.99"
    @ 3, 1 GET cVr2 PICTURE "@EZ 9,999,999.99"
    @ 5, 1 GET cVr3 PICTURE "@EZ 9,999,999.99"

    READ

RETURN NIL
 


and this program for FWH
Code: Select all  Expand view

#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVr1 := 0
    LOCAL cVr2 := 0
    LOCAL cVr3 := 0

    SetGetColorFocus()

    DEFINE DIALOG oDlg TITLE FWVERSION

    @ 1,   1 GET cVr1 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg RIGHT
    @ 2.5, 1 GET cVr2 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg RIGHT
    @ 4,   1 GET cVr3 PICTURE "@EZ 9,999,999.99" SIZE 50,12 OF oDlg RIGHT

    ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
 


In this GIF, you will find that FWH20.01 behaves like Clipper/(x)Harbour but not FWH1912.

Image


Hi Mr. Nages. Is possible apply these changes in older fivewin? Thank you!
wartiaga
 
Posts: 204
Joined: Wed May 25, 2016 1:04 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 20 guests