TTMSFNCTableView

There is an article describing how to customize TTMSFMXTableView to display items to have a nice Bubble message list by overriding the item shapes with the OnItemCustomize event. Below is a small sample that demonstrates this.
1. How can I apply the same to TTMSFNCTableView?
2. How can I move the Item bitmap to be aligned left or right ?
Thanks

To get you started, please take a look at the following code:




procedure TForm26.FormCreate(Sender: TObject);
begin
  TMSFNCTableView1.BeginUpdate;
  TMSFNCTableView1.Fill.Color := gcLightgray;
  TMSFNCTableView1.ItemAppearance.FixedHeight := 75;
  TMSFNCTableView1.ItemAppearance.HeightMode := tvhmFixed;
  TMSFNCTableView1.EndUpdate;
end;


procedure TForm26.TMSFNCTableView1BeforeDrawItem(Sender: TObject;
  AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem;
  var AAllow, ADefaultDraw: Boolean);
var
  r: TRectF;
begin
  r := ARect;
  InflateRectEx(r, -10, -10);
  ADefaultDraw := False;
  AGraphics.Fill.Kind := gfkSolid;
  if Odd(AItem.Index) then
  begin
    AGraphics.Fill.Color := gcLime;
    r.Right := r.Right - 30;
  end
  else
  begin
    AGraphics.Fill.Color := gcWhite;
    r.Left := r.Left + 30;
  end;


  if AItem.IsSelected then
    AGraphics.Fill.Color := gcSteelblue;


  AGraphics.DrawRoundRectangle(r);
end;


procedure TForm26.TMSFNCTableView1BeforeDrawItemText(Sender: TObject;
  AGraphics: TTMSFNCGraphics; ARect: TRectF; AItem: TTMSFNCTableViewItem;
  AText: string; var AAllow: Boolean);
var
  r: TRectF;
  ha: TTMSFNCGraphicsTextAlign;
begin
  r := ARect;
  InflateRectEx(r, -10, -10);
  AAllow := False;
  if Odd(AItem.Index) then
    ha := gtaTrailing
  else
  begin
    r.Left := r.Left + 30;
    ha := gtaLeading;
  end;


  if AItem.IsSelected then
    AGraphics.Font.Color := gcWhite;


  AGraphics.DrawText(r, AText, True, ha)
end;