Other Why does designer output not match my device output

davepamn

Active Member
Licensed User
Longtime User
New Tablet Resolution

Samsung Galaxy Tab 4 8”

WXGA TFT 800 x 1280 pixels

The button labels are truncating on the device, but look ok in the designer run script. Is there a bug


'Variant specific script: 1280x800,scale=1

lblHeader.Left=0dip
lblTemp.Width=lblHeader.Width
lblTemp.Left=0
pnlKeyboard.SetLeftAndRight(lblHeader.Right+10dip,100%x-10dip)
pnlKeyboard.SetTopAndBottom(10dip,100%y-5dip)
Button1.Width=(pnlKeyboard.Width/3)-3
Button1.height=(pnlKeyboard.Height/5)-4dip
Button2.Width=Button1.Width
Button3.Width=Button1.Width
Button4.Width=Button1.Width
Button5.Width=Button1.Width
Button6.Width=Button1.Width
Button7.Width=Button1.Width
Button8.Width=Button1.Width
Button9.Width=Button1.Width
Button0.Width=Button1.Width
btnCancel.Width=Button1.Width
btnClear.Width=Button1.Width
btnOk.Width=Button1.Width
Button2.Height=Button1.Height
Button3.Height=Button1.Height
Button4.Height=Button1.Height
Button5.Height=Button1.Height
Button6.Height=Button1.Height
Button7.Height=Button1.Height
Button8.Height=Button1.Height
Button9.Height=Button1.Height
Button0.Height=Button1.Height
Button10.Height=Button1.Height
btnCancel.Height=Button1.Height
btnClear.Height=Button1.Height
btnOk.Height=Button1.Height

'-----------------

Button1.Left=2dip
Button1.Top=2dip
Button2.HorizontalCenter=pnlKeyboard.Width/2
Button2.Top=2dip
Button3.right=pnlKeyboard.Width-2dip
Button3.Top=2dip
'------------------
Button4.Left=2dip
Button4.Top=Button1.bottom+2dip
Button5.Left=Button2.left
Button5.Top=Button1.bottom+2dip
Button6.Left=Button3.left
Button6.Top=Button3.bottom+2dip
'--------------------

Button7.Left=2dip
Button7.Top=Button4.bottom+2dip
Button8.Left=Button2.left
Button8.Top=Button5.bottom+2dip
Button9.Left=Button3.left
Button9.Top=Button6.bottom+2dip
'--------------------------------
Button0.Left=Button2.Left
Button0.Top=Button8.bottom+2dip
'-----------------------------
Button10.Width=Button1.Width
Button10.Height=Button1.Height
Button10.TextSize=Button1.TextSize
Button10.Left=Button9.left
Button10.Top=Button0.top



'--------------------------------

btnCancel.Left=2dip
btnCancel.Top=Button0.bottom+2dip
btnClear.Left=Button2.Left
btnClear.Top=Button0.bottom+2dip
btnOk.Left=Button3.Left
btnOk.Top=Button0.bottom+2dip
'-----------------------------------
Button1.TextSize=Button2.Height*.75
Button2.TextSize=Button2.Height*.75
Button3.TextSize=Button2.Height*.75
Button4.TextSize=Button2.Height*.75
Button5.TextSize=Button2.Height*.75
Button6.TextSize=Button2.Height*.75
Button7.TextSize=Button2.Height*.75
Button8.TextSize=Button2.Height*.75
Button9.TextSize=Button2.Height*.75
Button0.TextSize=Button2.Height*.75
Button10.TextSize=Button2.Height*.75
btnCancel.TextSize=Button2.Height*.4
btnClear.TextSize=Button2.Height*.4
btnOk.TextSize=Button2.Height*.4
 

davepamn

Active Member
Licensed User
Longtime User
Will you give an example of anchor and how I would use autoscaleall to set the font size based on resolution?
 
Upvote 0

davepamn

Active Member
Licensed User
Longtime User
Should I use

fontAdjust = ((100%x + 100%y) / (320dip + 480dip) - 1) * 3
button1.TextSize=lblMovies.TextSize + fontadjust

or should I use

Autoscale(button1)

why do you multiple the aspect ratio by 3
 
Last edited:
Upvote 0

davepamn

Active Member
Licensed User
Longtime User
I removed the code for text size, in designer, and changed the button size to 30 and used autoscaling.

I retested the code on the 1280 galaxy and it is working as designed.
 
Last edited:
Upvote 0
Top