Problem with blist and WVGA

schimanski

Well-Known Member
Licensed User
Longtime User
Hello

I have a problem with the position of the blist under WVGA (480x800 pixel). When I compile with Autoscale, the position under QVGA and VGA are correct. Under WVGA, the blist is higher up from the bottom:

B4X:
 blist.New2("Form1",0,110,240,140)

When i use ...("Form1",0,110*ScreenScaleY,240,140), the list is to below. What should i do to use the blist under every solution always with the same distance from the bottom?

Thanks for help!!!
 

schimanski

Well-Known Member
Licensed User
Longtime User
Hello Erel,

i have tried it, but without success. Then i tried

B4X:
bList.New2("Form1", 0,Form1.Height-180, 240, 140)

(The button on the bottom is 40 pixel heigh, the blist 140 pixel (=180)).

This one runs on Desktop and WVGA, but on VGA the blist is to high.


I have printed the pixels fom the different solutions:

Desktop (Screensize 240x340)
Form1.height=288
blist.height=140
btnBottom.height=40
ScreenScaleY=1

VPA Compact GPS (QVGA 240x320)
Form1.height=268
blist.height=140
btnBottom.height=40
ScreenScaleY=1

HTC Touch Diamond 1 (VGA 480x640)
Form1.height=268
blist.height=140
btnBottom.height=80
ScreenScaleY=2

HTC Touch Diamond 2 (WVGA 480x800)
Form1.height=348
blist.height=140
btnBottom.height=100
ScreenScaleY=2 (?????????????)

Thanks for help...
 
Last edited:

schimanski

Well-Known Member
Licensed User
Longtime User
Hello Erel!

I have compiled with Autoscale. Is ScreenScale the ratio between weight and height? I thought, that screenscaleY is the multiple from the height of the QVGA. But then, screenscaleY on WVGA must be 2.5 and not 2.

Thanks for your help, I will going to test something else...
 

agraham

Expert
Licensed User
Longtime User
ScreenScale is based on the nominal dpi (dots per inch) of the display compared to that of a QVGA screen. QVGA devices have a dpi of 96. VGA and WVGA usually have a dpi of 192. So you will always see a ScreenScale of either 1 on QVGA devices and 2 on VGA or WVGA devices. Some Smartphones with other sizes of screen may have different dpis and so different ScreenScale values.
 

schimanski

Well-Known Member
Licensed User
Longtime User
Jo, I see....

I have now tried everything to show the blist just over the buttons on the buttom (40 pixel height under QVGA) , but no result.:BangHead:

Is it not possible to show the blist just over the buttons under every screensolution????
 

klaus

Expert
Licensed User
Longtime User
Try this code :
B4X:
[FONT=Courier New][SIZE=2][COLOR=#0000ff]
[SIZE=2][FONT=Courier New][COLOR=#0000ff][SIZE=2][FONT=Courier New][COLOR=#0000ff]If[/COLOR][/FONT][/SIZE][/COLOR][/FONT][/SIZE][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] Form1.Height<[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]320[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]Then[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]blist.New2([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Form1"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]110[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]240[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]140[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]Else[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]blist.New2([/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000][FONT=Courier New][SIZE=2][COLOR=#800000]"Form1"[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]110[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]320[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],[/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080][FONT=Courier New][SIZE=2][COLOR=#800080]140[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2])[/SIZE][/FONT]
[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]

You can adapt the values for each screen.

ScreenScaleY is the same for WVGA and VGA screens. You just 80 have pixels more space on the WVGA screen.
Autoscale will not stretch the controls nor change their Top parameter.
It's up to you to handle this extra space.

Best regards.
 

schimanski

Well-Known Member
Licensed User
Longtime User
Yes, thanks a lot!

I handled it like Klaus said. It's not so much work as i thought before.

I hope, that the producers of the pocket-PCs are carefully agree a standard of screensolution. :BangHead:
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…