Windows 4GL vs Xterminal

> Has anyone seen problems in W4GL where widgets (buttons, text, etc.) do
> not align properly?

yup its a real pain - on a pc you can even get it between different vga 
drivers at the same resolution!

Following the manual with stackfields etc helps but with x11 you tend to 
have to make sure the right fonts are available, which with xterms means 
letting them get their fonts across the net. ie They end up with the same 
fonts as your development systems - provided of course, that your xterms 
can serve from remote font directories :?   (xset -q   is most valuable 
for checking which fonts are being/may be   used)

The other catch is with the physical screen size as reported to w4gl - 
screens at the same resolution (eg 1024x768) and nominally the same size 
(eg 19")  from different vendors or with different windowing software can 
report different height/width to w4gl - which blows its positioning 
algorithms.


To cover this problem we use the 'help - about' type box on our 
applications to report the current screen size (screenheight & 
screenwidth) from the sessionobject.  Record the values from a screen 
where you are happy - usually a development screen, then compare with the 
values when running on a target screen.

You can then use the environment variables II_SCREEN_WIDTH_INCHES & 
II_SCREEN_HEIGHT_INCHES to improve things - with a new type of 
display/x11/w3 driver we work as follows:

        given the values for height/width from a 'working' display (h w)
        
        on the new display set up the environment variables to eg 14 x 12
        run up the program and record the reported height/width value (h1 
w1)
        
        calculate the 'correct' values for the environment variables
        (in the   14 x 12  example:
                'correct' height =  12 * h / h1
                'correct' width  =  14 * w / w1     )
                
 set these values up and you're a little closer - note that if you are 
using inches you need 3 places of decimals when setting the II's - which 
means you also need 3 places in displaying them if you don;t use the 
default 1000ths
                
Certainly with Sun/Dec/Hp/Aix portability and pc to pc portability we 
have found that getting the fonts and II's right makes the largest 
contribution to portability - even with stackfields all over the place.

        good luck!
         
Jim Daley CSC - jdaley@cix.compulink.co.uk   - opinions are mine alone :)
Ingres Q & A
To William's Home Page

© William Yuan 2000

Email William