Hi
is it possible to add more elements to the TableViewitem ?
i want to add some extra elements (THTMLText, image,...) elements and how to access them ?
Br,
Filip
Hi,
Yes you can by customizing the item:
procedure TForm2.FormCreate(Sender: TObject);
begin
TMSFMXTableView1.ItemOptions := TMSFMXTableView1.ItemOptions + [ioRightRectangle];
end;
procedure TForm2.TMSFMXTableView1ItemCustomize(Sender: TObject;
AItem: TTMSFMXTableViewItem; AItemShape: TTMSFMXTableViewItemShape;
AItemControlShape: TControl);
var
panel: TRectangle;
edt: TEdit;
begin
panel := AItem.ShapeRightRectangle;
if Assigned(panel) then
begin
panel.fill.Color := $FFF7F7F7;
edt := TEdit.Create(panel);
if Assigned(edt) then
begin
edt.Parent := panel;
edt.Text := 'Lab';
edt.Position.X := 1;
edt.Position.Y := 1;
edt.Size.Width := 25;
edt.TextSettings.Font.Size := 20;
edt.TextSettings.Font.Style := [TFontStyle.fsBold];
edt.TextSettings.FontColor := TAlphaColorRec.Navy;
edt.Canvas.Fill.Color := TAlphaColorRec.Red;
edt.Visible := True;
edt.BringToFront;
end;
end;
end;