measurestringwidth

  1. epiCode

    Android Code Snippet [B4X] Calculate width of Charsequence Text

    Calculate width of Charsequence Text Uses Java Function measureText(charSequence , int Start, int End) ' textSize is default textsize of label where charsequence is displayed Sub getWidthofCS(cx As Object,textSize As Float) As Float Dim jo As JavaObject = Me Return...
  2. MarcRB

    B4J Question Calculate string width

    Hello, I know it isn't wanted to re-ask the same question, but I do... Please for give me. Can someone put me in the right direction by calculating StringWidth. I mean the lenght in pixels, units or some value from any string in a specified font. Maybe I can draw a string on a blanc...
  3. MarcRB

    B4J Question How to calculate string width for PDFBox

    I made some simple functions for easy writing on top of an existing PDF. Thanks to DonManfred post: PDFBox post#4 I need to calculate stringwidth for center align and right align. On StackOverflow I found the stringwidth could by calculated with a function at font object. But in the for B4J...
  4. LucaMs

    Android Question [Solved by Klaus] 9Patch and MeasureStringWidth

    If there a "conflict" between 9Patch and canvas MeasureStringWidth or, as always :D, I'm doing something wrong? If I use canvas MeasureStringWidth after applying the 9 patch I get a strange result (see the attached project, please).
Top