Controls alignment bug

Controls alignment bug

Postby Enrico Maria Giordano » Wed Jan 11, 2006 3:53 pm

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

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8389
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Wed Jan 11, 2006 7:33 pm

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  Expand view
    @ 5.7, 10 GET cVar2;
            SIZE 70, 20
regards, saludos

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

Postby Enrico Maria Giordano » Wed Jan 11, 2006 8:35 pm

Unfortunately it is not linear:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8389
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Wed Jan 11, 2006 9:00 pm

Enrico,

The only solution is to modify include\constant.ch and recompile all PRG classes.
regards, saludos

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

Postby Enrico Maria Giordano » Wed Jan 11, 2006 10:55 pm

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

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

Postby Antonio Linares » Wed Jan 11, 2006 11:41 pm

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
Antonio Linares
Site Admin
 
Posts: 41441
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Thu Jan 12, 2006 8:29 am

Ok, let me do some experiment...

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

Postby Enrico Maria Giordano » Thu Jan 12, 2006 1:49 pm

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
Enrico Maria Giordano
 
Posts: 8389
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Thu Jan 12, 2006 8:10 pm

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
Antonio Linares
Site Admin
 
Posts: 41441
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Thu Jan 12, 2006 8:40 pm

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
User avatar
Enrico Maria Giordano
 
Posts: 8389
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 8 guests