Page 1 of 1
Controls alignment bug
Posted: Wed Jan 11, 2006 3:53 pm
by Enrico Maria Giordano
The following sample shows that SAYs and GETs don't get aligned throughout the display:
Code: Select all | Expand
#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
Posted: Wed Jan 11, 2006 7:33 pm
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:
Posted: Wed Jan 11, 2006 8:35 pm
by Enrico Maria Giordano
Unfortunately it is not linear:
Code: Select all | Expand
#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
Posted: Wed Jan 11, 2006 9:00 pm
by Antonio Linares
Enrico,
The only solution is to modify include\constant.ch and recompile all PRG classes.
Posted: Wed Jan 11, 2006 10:55 pm
by Enrico Maria Giordano
Is it something that you can change in the standard FWPPC build?
EMG
Posted: Wed Jan 11, 2006 11:41 pm
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 ?
Posted: Thu Jan 12, 2006 8:29 am
by Enrico Maria Giordano
Ok, let me do some experiment...
EMG
Posted: Thu Jan 12, 2006 1:49 pm
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
Posted: Thu Jan 12, 2006 8:10 pm
by Antonio Linares
Enrico,
Yes, thats a solution, but still we have to decide the value for each row and column.
Posted: Thu Jan 12, 2006 8:40 pm
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