TTMSFNCTableViewItem adapt the image to display inside an item

I use Tableview control, in this control I need to load image into in every item that list, but I need to adapt the image to display inside an item because every image not have the same size

Is possible do this?


Yes, you can use the following code and add the FMX.TMSFNCTreeViewData:

procedure TForm1.DoGetNodeIconSize(Sender: TObject;
  ANode: TTMSFNCTreeViewVirtualNode; AColumn: Integer; ALarge: Boolean;
  AIcon: TTMSFNCBitmap; var AIconWidth, AIconHeight: Double);
  AIconWidth := 40;
  AIconHeight := 40;

procedure TForm1.FormCreate(Sender: TObject);
  TMSFNCTableView1.TreeView.OnGetNodeIconSize := DoGetNodeIconSize;

Pieter thanks, is great!!!!

1 Like

This go fine in webcore app ? i tried it for left icon image but nothing ...

Please provide more info, a sample would be great.