i found lots of thread on how to measure the height of a string but i want something different.
i want to add a label to a clv. i know the width of the clv and i want to add a single label to each clv item. but how can i know the Height of the label?
the width of the label is the same as the clv width but how do i measure the height of the label so the text will fit inside?
i need to measure the string with his typeface and textsize that should fit in a specific width (clv width) but height is unknown!
Here's a demo of how to use the nominatim geocoding API for free. Note: There are other geocoding options if you want to know, leave your comments. Demo file attached Sub GeoCoderNominatim(Query As String) As ResumableSub Dim ResultURL As String Dim j As HttpJob Dim Parameter() As...
Hi, I have a stack of views: imageview, label, and a few checkboxes that load its content dynamically (check the picture), how I can align them vertically ? avoiding blank spaces ? shrinking the height of each
Here's a demo of how to use the nominatim geocoding API for free. Note: There are other geocoding options if you want to know, leave your comments. Demo file attached Sub GeoCoderNominatim(Query As String) As ResumableSub Dim ResultURL As String Dim j As HttpJob Dim Parameter() As...
thanx guys, i found the answer 5 minutes after writing this post and it was infront of my eyes:
StringUtils does exactly what i wanted, it gives me back the height i need to set to the label and this is what i needed although its not very accurate but its good enough for me. (the reason it is less accurate may be because of me using Hebrew letters but i am not sure, anyway it is a good solution for my problem )
thanx but in my case the label height is to big when there is more text so your solution will make it bigger.
it is less important to me. i dont need it to be to much accurate but i wonder how Whatsapp is doing the calculation. you can see it doesnot matter what language you are using the height is very precise according to the text.
Hi All. I made this example for a chatbot app here on brasil and now i want to share it here. This example use xCLV and IME lib (Already in B4A). The messages fit both vertically and horizontally, making them fully responsive. Note: The text field expands according to the text size...
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
For i = 0 To 10
CustomListView1.AddTextItem(getrandomtext(Rnd(100,300)),i)
Next
End Sub
Private Sub getrandomtext(num As Int) As String
Dim allowedChars As String = "אבגדהוזחטיכלמנסעפצקרשתךףן 1234567890"
Dim returnTxt As String
For i = 0 To num
Dim index As Int = Rnd(0,allowedChars.Length)
returnTxt = returnTxt & allowedChars.CharAt(index)
Next
Return returnTxt
End Sub