DipToCurrent (Length As Int) As IntScales the value, which represents a specific length on a default density device (Density = 1.0),to the current device. For example, the following code will set the width value of this button to be the same physical size on all devices. Button1.Width = DipToCurrent(100) Note that a shorthand syntax for this method is available. Any number followed by the string 'dip' will be converted in the same manner (no spaces are allowed between the number and 'dip'). So the previous code is equivalent to: Button1.Width = 100dip 'dip -> density independent pixel Bug? Google Pixel XL and DipToCurrent Problem - Jack Cole    Oct 23, 2016 I am having a problem with using DipToCurrent with the Google Pixel phone (Android 7).
Here are some values as calculated by the app.
DipToCurrent(1)=3
DipToCurrent(2)=7
DipToCurrent(3)=10
1dip... B4A Question DipToCurrent() question - milehi (first post)    Jun 21, 2011 Thank you Erel, I will send an email for the fix soon. Did I forget to mention you have a excellent product... keep up the great work. :sign0098:... B4A Code Snippet [B4X] Auto Height Webview - Biswajit    Aug 26, 2020   (6 reactions) As Boolean, Result As String)
If Success Then webview.Height = DipToCurrent(Result)
End Sub
If...);")
End Sub
Sub SetWVHeight(height As String)
webview.Height = DipToCurrent(height)
End Sub... B4A Question BBCodeView Printout the Text Backword - Addo    Sep 2, 2022 (GroupNumber)
SmileCodeToimage = CreateSmileyImage(0, 0, DipToCurrent(30), DipToCurrent(30...-with-b4xgifview.142617/#post-904099
I am using String builder along with regex to create a string and replace... B4A Question how to give a value from the ((spinner)) - Mahares (first post)    Oct 2, 2022 Fixed When placed in LoadBitmapResize Shouldn't your width and height be in dip. If so, I think instead of: bmp1 = xui.LoadBitmapResize(File.DirAssets, "T.jpg",w,h,False) It should be: bmp1 = xui.LoadBitmapResize(File.DirAssets, "T.jpg",DipToCurrent(w),DipToCurrent(h),False)... B4A Question Select item in CLV - Erel (first post)    Jul 19, 2021 This is a mistake:
DipToCurrent(100dip)
It should be:
Log(100dip & " / " & item.Size)
'or
Log(DipToCurrent(100) & " / " & item.Size)
... Spanish [B4XPages] jRDC2 + MySQL CRUD + Login - TILogistic (first post)    Feb 2, 2021   (1 reaction) Use: DipToCurrent PrefDialogEvents.Initialize(Root , "Events", 90%x, 300dip) PrefDialogEvents.Initialize(Root, "Events", DipToCurrent(Root.Width * 0.90), DipToCurrent(300)) por lo que he visto no son muchos los cambios. vamos que se puede!!! 😁😁😁 Saludos.... B4J Question To dip or not to dip - 4k display question - emexes (first post)    Aug 6, 2019 was the same.
then that would imply that DipToCurrent() has no effect, which... hmm...
SecondForm.WindowLeft = DipToCurrent(OriginX) + 300dip
SecondForm.WindowTop = DipToCurrent(OriginY) + 300dip
Log... Games Roll the dice - 6 dice, 6 colors - lets roll... - PaulMeuris (first post)    Oct 5, 2022 = GetDeviceLayoutValues.height - 80dip dicesize = DipToCurrent(devwidth/4) pnlmain.Height = DipToCurrent....Height) lblresult.SetLayout(DipToCurrent(devwidth/3)-50dip,pnlmain.Height+pnlsettings.Height+20dip,400dip,60dip) btnroll.SetLayout(DipToCurrent(devwidth/3),pnlmain.Height+pnlsettings.Height+100dip,300dip,300dip) Else dicesize = DipToCurrent(devwidth/4) End If Log...If you want to use this app on a tablet you could do with some screen adjustments. In... B4A Question csbuilder and pictures - TILogistic (first post)    Aug 2, 2022 ? see: xui.LoadBitmapResize(File.DirAssets, "support.png", w, h, True) Label2.SetColorAndBorder(xui.Color_White, 1dip, xui.Color_DarkGray, 10dip) Dim w As Int = DipToCurrent(Label2.Width * .50) Dim h As Int = DipToCurrent(Label2.Height * .50) Dim cs As CSBuilder cs.Initialize cs.Alignment("ALIGN_CENTER") cs.Append("Call Center") cs.Append(CRLF) cs.Image(xui.LoadBitmapResize(File.DirAssets, "support.png", w, h... Page: 1   2   3   4   5   6   7   |