title: How to adjust ListBox items height to fit the text in Firemonkey (android)?
body: <p>I'm using this code to add an item to a listbox, but I can't figure out how to dynamically resize the height of the item to fit the text:</p>
  
  <pre><code>procedure TmForm.AddItemBtnClick(Sender: TObject);
  var
    Item: TListBoxItem;
  begin
    Item := TListBoxItem.Create(nil);
    Item.Parent := SomeListBox;
    Item.StyleLookup := 'listboxitemstyle';
    Item.Text :=
                'Pe cararea lunga scurta se ducea un om venind, si-n tacerea lui ' +
                'profunda se auzea borborosind. Cantr-o noapte intunecoasa soarel' +
                'e lucea pe cer, iara eu cu barca in casa ma plimbam ca un boier.';
    Item.WordWrap := true;
    Item.StyledSettings := [TStyledSetting.ssFamily] + [TStyledSetting.ssStyle] + [TStyledSetting.ssFontColor];
    Item.Font.Size := 14;
  end;
  </code></pre>
  
  <p>I tried using the code from <a href="https://stackoverflow.com/questions/18430290/how-to-adjust-button-size-to-fit-the-text-in-delphi-firemonkey">this example</a> (modified for TListBoxItem), but it didn't work.</p>
  
  <p><strong>Edit:</strong> The height of the ListBoxItem can be set by just adding <code>Item.Height := 100;</code> at the end of the code above, but I need to know the height of text to decide what size the ListBoxItem needs to be, so to clarify my question, how do I get the height of the text in the list box item?</p>