K keb New Member Licensed User Longtime User Yesterday at 1:11 AM #1 What are the units of the value returned by MeasureStringWidth? It seems to be pixels, but I'm not sure. And then (yes, I've looked at all the dip/pixel/scale info and I'm still not sure what's going on) how do I convert it to dips? Thank you.
What are the units of the value returned by MeasureStringWidth? It seems to be pixels, but I'm not sure. And then (yes, I've looked at all the dip/pixel/scale info and I'm still not sure what's going on) how do I convert it to dips? Thank you.
Erel B4X founder Staff member Licensed User Longtime User Yesterday at 6:00 AM #2 Pixels. You don't usually need to convert it. This will work: B4X: Label1.Height = ValueReturned The 'dip' suffix converts the dips to pixels. On a device with scale=2, 100dip = 200 pixels. Upvote 0
Pixels. You don't usually need to convert it. This will work: B4X: Label1.Height = ValueReturned The 'dip' suffix converts the dips to pixels. On a device with scale=2, 100dip = 200 pixels.