Download the free trial version
Questions (Windows Mobile) Post any question regarding Basic4ppc.
Problem with blist and WVGA
02-25-2010, 10:00 AM
Basic4ppc Veteran
Join Date: Oct 2007
Location: Germany
Posts: 289
Problem with blist and WVGA
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:
Code:
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
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000
Dekstop: Asus Eee PC
02-25-2010, 07:11 PM
Administrator
Try:
Code:
bList.New2( " Form1 " , 0 , Form1.Height - 210 , 240 , 140 )
02-26-2010, 09:29 AM
Basic4ppc Veteran
Join Date: Oct 2007
Location: Germany
Posts: 289
Hello Erel,
i have tried it, but without success. Then i tried
Code:
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...
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000
Dekstop: Asus Eee PC
Last edited by schimanski : 02-26-2010 at 12:21 PM .
02-26-2010, 12:54 PM
Administrator
Did you compile your program with AutoScale?
Note that the ratio between the height and width of WVGA is different than the ratio of VGA and QVGA. So you cannot get the exact same layout.
02-27-2010, 03:44 PM
Basic4ppc Veteran
Join Date: Oct 2007
Location: Germany
Posts: 289
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...
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000
Dekstop: Asus Eee PC
02-27-2010, 05:05 PM
Basic4ppc Expert
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.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
02-27-2010, 06:28 PM
Basic4ppc Veteran
Join Date: Oct 2007
Location: Germany
Posts: 289
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.
Is it not possible to show the blist just over the buttons under every screensolution????
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000
Dekstop: Asus Eee PC
02-27-2010, 06:39 PM
Basic4ppc Expert
I don't understand the problem. Why can't you read the height of the form and adjust the size and position of the Blist accordingly?
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
02-27-2010, 07:02 PM
Basic4ppc Expert
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,758
Awards Showcase
Try this code :
Code:
<font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " > <font size= " 2 " ><font face= " Courier New " ><font color= " #0000ff " ><font size= " 2 " ><font face= " Courier New " ><font color= " #0000ff " > If </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " > Form1.Height<</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 320 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " > Then </font></font></font> </font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >blist.New2(</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800000 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800000 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800000 " > " Form1 " </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 0 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 110 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 240 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 140 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >)</font></font> </font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " > Else </font></font></font> </font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >blist.New2(</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800000 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800000 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800000 " > " Form1 " </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 0 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 110 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 320 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >,</font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " ><font face= " Courier New " ><font size= " 2 " ><font color= " #800080 " > 140 </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font face= " Courier New " ><font size= " 2 " >)</font></font> </font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " > End </font></font></font></font></font></font></font></font></font><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " ><font face= " Courier New " ><font size= " 2 " ><font color= " #0000ff " > If </font></font></font></font></font></font></font></font></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.
__________________
Klaus
Switzerland
02-27-2010, 08:30 PM
Basic4ppc Veteran
Join Date: Oct 2007
Location: Germany
Posts: 289
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.
__________________
schimanski
--------------------------------------
Device: Motorola Defy, Samsung Galaxy Tab P1000
Dekstop: Asus Eee PC
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT. The time now is 01:35 PM .