Controls alignment bug

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

Controls alignment bug

Post by Enrico Maria Giordano »

The following sample shows that SAYs and GETs don't get aligned throughout the display:

Code: Select all

#include "Fwce.ch"


FUNCTION MAIN()

    LOCAL oWnd

    LOCAL cVar1 := SPACE( 20 )
    LOCAL cVar2 := SPACE( 20 )

    DEFINE WINDOW oWnd

    @ 1, 1 SAY "Name 1:";
           SIZE 70, 20

    @ 1, 10 GET cVar1;
            SIZE 70, 20

    @ 5, 1 SAY "Name 2:";
           SIZE 70, 20

    @ 5, 10 GET cVar2;
            SIZE 70, 20

    ACTIVATE WINDOW oWnd

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

Post by Antonio Linares »

Enrico,

Yes, thats normal in FW, as we calculate each row based on the control height. With this little modification it shows ok:

Code: Select all

    @ 5.7, 10 GET cVar2; 
            SIZE 70, 20 
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:

Post by Enrico Maria Giordano »

Unfortunately it is not linear:

Code: Select all

#include "Fwce.ch"


FUNCTION MAIN()

    LOCAL oWnd

    LOCAL cVar1 := SPACE( 20 )
    LOCAL cVar2 := SPACE( 20 )
    LOCAL cVar3 := SPACE( 20 )

    DEFINE WINDOW oWnd

    @ 1, 1 SAY "Name 1:";
           SIZE 70, 20

    @ 1, 10 GET cVar1;
            SIZE 70, 20

    @ 5, 1 SAY "Name 2:";
           SIZE 70, 20

    @ 5.7, 10 GET cVar2;
              SIZE 70, 20

    @ 10, 1 SAY "Name 3:";
            SIZE 70, 20

    @ 10.7, 10 GET cVar3;
               SIZE 70, 20

    ACTIVATE WINDOW oWnd

    RETURN NIL
Any workaround other than using a calculation?

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

Post by Antonio Linares »

Enrico,

The only solution is to modify include\constant.ch and recompile all PRG classes.
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:

Post by Enrico Maria Giordano »

Is it something that you can change in the standard FWPPC build?

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

Post by Antonio Linares »

Enrico,

We may modify it here, but we have to decide, all together, what values to use. Should the SAYs be the reference ? the GETs ?
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:

Post by Enrico Maria Giordano »

Antonio Linares wrote:Enrico,

We may modify it here, but we have to decide, all together, what values to use. Should the SAYs be the reference ? the GETs ?
I think that we don't have to care what controls should be the reference. We just need that row "n" is the same for all the controls. Don't you agree?

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

Post by Antonio Linares »

Enrico,

Yes, thats a solution, but still we have to decide the value for each row and column.
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:

Post by Enrico Maria Giordano »

GETs could be a good reference as they are the most used controls.

I think that now is the right time for this fix due to the little backward compatibility problems. After it would be late exactly like for Fivewin.

EMG
Post Reply