designer script help

dgoss

Member
Licensed User
Longtime User
I'm having probs with designer script. i have a phone with dimensions of 240 x 320 scale = 0.75. The designer is not autoscaleing the app so i can't see if everything is where its supposed to be. Any ideas why this is.

thx in advance
 

dgoss

Member
Licensed User
Longtime User
thx erel for quick reply, but get error - parsing 7.5 as number
now i can not find 7.5 anywhere in my code. Any ideas

again thx in advance
 
Upvote 0

dgoss

Member
Licensed User
Longtime User
Hi Erel,
this is the designer script code


B4X:
'All variants script
AutoScaleAll 'uncomment to scale all views based on the device physical size.
autoscalerate(0.5)
BtnRight.Bottom = 100%y +40dip
BtnRight.Height=60dip:BtnRight.Width = 140dip
BtnRight.Right =100%x
BtnLeft.Bottom = 100%y +40dip
BtnLeft.left = 0%x 
BtnLeft.Height=60dip:BtnLeft.Width = 140dip
PnlMain.SetTopAndBottom(0%y,BtnLeft.Top - 5dip)
PnlMain.SetLeftAndRight(0%y,100%x)
PnlMain.Top = 0%y
PnlMain.Bottom = BtnLeft.Top - 5dip
ImageView1.SetLeftAndRight(3dip,90dip)
ImageView1.SetTopAndBottom(100dip,180dip)
ImageView1.Top = 5%y
LblFnight.SetLeftAndRight(90dip,280dip)
LblFnight.SetTopAndBottom(0%y,100dip)
LblFnight.Top = 0%y
Label1.SetLeftAndRight(110dip,280dip)
Label1.SetTopAndBottom(LblFnight.bottom,50dip)
Label1.Top = LblFnight.bottom - 25dip
Lblremain.SetLeftAndRight(105dip,280dip)
Lblremain.SetTopAndBottom(LblFnight.bottom- 10dip ,60dip)
'Lblremain.Top = Label1.Bottom +90dip
Button1.Width =190dip:Button1.Height = 70dip
Button1.VerticalCenter = 50%y - 30dip
Button1.HorizontalCenter = 50%x '+ 70dip
''''''''''''''''''''''''''''''''''''''''''''''''''
PnlTimes.Top = 0%y
PnlTimes.SetLeftAndRight(0%y,100%x)
PnlTimes.Height = BtnLeft.Top -5dip
LblBar2.SetLeftAndRight(0%y,100%x):LblBar2.Height = 15dip:LblBar2.Bottom = PnlTimes.Bottom
Label18.Left = 2%x
Label18.Top = ImageView2.Bottom +25dip
Label18.Height = 30dip:Label18.Width = 170dip
Label18.HorizontalCenter = 50%x
LblDrvRem.Height = 56dip
LblDrvRem.Top = Label18.Bottom -10dip
LblDrvRem.HorizontalCenter = 50%x'.Right = 100%x -10dip
LblBar.SetLeftAndRight(0%y,100%x):LblBar.Height = 15dip
LblBar.Bottom = LblDrvRem.Bottom +30dip
'''''''''''''''''''''''''''''''''''''''
ImageView2.left = 5dip.
ImageView2.Height = 80dip
ImageView2.Width = 80dip
ImageView2.Top = 10%y
'''''''''''''''''''''''''''
ImageView3.HorizontalCenter = 15%x
ImageView3.Height = 60dip
ImageView3.Width = 60dip'
'ImageView3.bottom = ImageView4.Bottom
ImageView3.Top = LblBar.Bottom +5dip
''''''''''''''''''''''''''''''''''''''''''
ImageView4.HorizontalCenter = 50%x
ImageView4.Height = 60dip
ImageView4.Width = 60dip
ImageView4.bottom = ImageView3.Bottom
''ImageView4.Bottom= ImageView5.top -10dip
'ImageView2.Bottom= ImageView3.top -10dip
'''''''''''''''''''''''''''''''''''''''''''
ImageView5.Right = 100%x +20dip 
ImageView5.Height = 60dip
ImageView5.Width = 60dip
ImageView5.bottom = ImageView3.Bottom
'ImageView5.Bottom= PnlTimes.Bottom -10dip
''''''''''''''''''''''''''''''''''''''''''''''''''''
Label5.Left = ImageView5.Right +10dip
Label5.Top = ImageView5.top - 5dip
Label5.Height = 60dip:Label5.Width = 140dip
Label4.Left = ImageView4.Right +10dip
Label4.Top = ImageView4.top - 5dip
Label4.Height = 60dip:Label4.Width = 180dip
Label3.Left = ImageView3.Right +10dip':Label8.Left = Label3.Right + 35dip
Label3.Top = ImageView3.Bottom +8dip:Label8.top = Label3.top
Label3.TextSize = 55
Label3.Height = 80dip:Label3.Width =185dip:Label3.HorizontalCenter = 50%x
LblBar1.SetLeftAndRight(0%y,100%x):LblBar1.Height = 15dip:
LblBar1.Top = Label3.Bottom+25dip
Label22.Top = LblBar1.Bottom '-51dip
Label22.TextSize = 25
Label22.width = 210dip
Label22.Height = 60dip
LblRestBefore.Left = Label22.Right +5dip
LblRestBefore.Top = Label22.top
LblRestBefore.Width = 160dip
LblRestBefore.Height = 60dip
Label8.Height = 60dip:Label8.Width = 120dip:Label8.Right = 100%x
Label2.HorizontalCenter = 50%x - 30dip'Left = ImageView2.Right +10dip
Label2.TextSize = 60:Label2.Height = Label2.TextSize +40dip
Label2.Top = ImageView2.top -15dip
Label2.Width = 170dip
LbLShiftTime.Width = 80dip:LbLShiftTime.Height = 35dip
LbLShiftTime.top = 2dip:LbLShiftTime.Right = 100%x
ImageView6.SetTopAndBottom(1%y,40dip)
ImageView6.Width = 40dip
ImageView6.Right = LbLShiftTime.Left - 5dip
Label7.Bottom = Label8.Top +20dip:Label7.Right = 100%x
Label6.top = 1%y:Label6.Left = 5dip

'PnlStats.Top = 0%y
'PnlStats.SetLeftAndRight(0%y,100%x)
'PnlStats.Height = BtnLeft.Top -5dip
ImageView7.Top = 2%y:Label9.SetTopAndBottom(4%y,20dip)
Label9.Width = 65dip:Label9.Height =30dip
Label9.Left = ImageView7.right +10dip:Label9.Top = 4%y
Label13.Bottom = Label9.Bottom
Label13.Left = Label9.right +10dip
Label13.width = 90dip:Label13.Height = 45dip
ImageView8.Top = 15%y
Label10.Width = 65dip:Label10.Height =30dip
Label10.Left = ImageView8.right +10dip:Label10.Top = 17%y
Label14.Bottom = Label10.Bottom
Label14.Left = Label10.right +10dip
Label14.width = 90dip:Label14.Height = 45dip
ImageView9.Top = 28%y
Label11.Width = 65dip:Label11.Height =30dip
Label11.Left = ImageView9.right +10dip:Label11.Top = 30%y
Label15.Bottom = Label11.Bottom
Label15.Left = Label11.right +10dip
Label15.width = 90dip:Label15.Height = 45dip
ImageView10.Top = 41%y
Label12.Width = 65dip:Label12.Height =30dip
Label12.Left = ImageView10.right +10dip:Label12.Top = 43%y
Label16.Bottom = Label12.Bottom
Label16.Left = Label12.right +10dip
Label16.width = 90dip:Label16.Height = 45dip
LblSplit.SetLeftAndRight(0%y,100%x)
LblSplit.height = 15dip
LblSplit.bottom = ImageView10.bottom +16dip
Label17.Top = LblSplit.Bottom -5dip
Btnreduced0.top = Label17.bottom.Bottom 
Btnreduced0.SetLeftAndRight(1%y,20%x)
Btnreduced0.Width=65dip
Btnreduced0.SetTopAndBottom(Label17.bottom,30dip)
BtnReduced1.SetLeftAndRight(25%y,10dip)
BtnReduced1.Width=65dip
BtnReduced1.SetTopAndBottom(Label17.bottom,30dip)
BtnReduced2.SetLeftAndRight(50%y,30dip)
BtnReduced2.Width=65dip
BtnReduced2.SetTopAndBottom(Label17.bottom,30dip)
Lblsplit1.SetLeftAndRight(0%y,100%x)
Lblsplit1.Height = 15dip
Lblsplit1.Top = Label17.Bottom +50dip
'PnlWorkTimes.SetTopAndBottom(0%y,BtnLeft.Top -5dip)
'PnlWorkTimes.SetLeftAndRight(0%y,100%x)
LstStats.SetLeftAndRight(0%y,100%x)
LstStats.SetTopAndBottom(10%x ,PnlWorkTimes.Bottom)
Label19.SetLeftAndRight(0%x,100%x):Label19.Top - 0dip
'Spinner1.right = 100%x:Spinner1.Top = 0%x:Spinner1.Height=Label19.Height
'PnlRest.SetTopAndBottom(0%y,BtnLeft.Top -5dip)
'PnlRest.SetLeftAndRight(0%y,100%x):PnlRest.Height = 250dip
Label20.SetLeftAndRight(0%y,100%x)
Label20.Top = PnlRest.top +2dip
Chkb1.Top = Label20.Bottom +5dip
Chkb1.SetLeftAndRight(0%y,100%x)
Chkb2.Top = Chkb1.Bottom +5dip
Chkb2.SetLeftAndRight(0%y,100%x)
LblStartDateTime.Top = Button1.Bottom +5dip
LblStartDateTime.SetLeftAndRight(0%y,100%x)
LblStartDateTime.Height = 25dip
Lbl9Hr.Top = LblStartDateTime.Bottom +5dip:Lbl9Hr.SetLeftAndRight(0%y,100%x)
Lbl11Hr.Top = Lbl9Hr.Bottom +15dip:Lbl11Hr.SetLeftAndRight(0%y,100%x)
Lbl24Hr.Top = LblStartDateTime.Bottom +5dip:Lbl24Hr.SetLeftAndRight(0%y,100%x)
Lbl45Hr.Top = Lbl24Hr.Bottom +15dip:Lbl45Hr.SetLeftAndRight(0%y,100%x)
Lbl9Hr.TextSize = 20:Lbl11Hr.TextSize = 20
Lbl24Hr.TextSize = 20:Lbl45Hr.TextSize = 20
Lbl24Hr.Height = 50dip
Lbl45Hr.Height = 50dip'Lbl45Hr.TextSize+25dip
Lbl9Hr.Height = 50dip'Lbl9Hr.TextSize+25dip
Lbl11Hr.Height = 50dip'Lbl11Hr.TextSize+25dip
 
Upvote 0

dgoss

Member
Licensed User
Longtime User
Thx Erel

i not to bothered bout UI cloud so i'll finish this thread

but i would like to thk u for the info u gave earlier it has put me back on track.
This is also one the best forums i know for the quick and helpful replies.
 
Upvote 0
Top