Hi,
If I set the HitTest to false the individual items can still be selected.
Thanks,
Ken
Also setting CanSelect for the individual item is ignored.
in procedure TTMSFMXTableView.ProcessItem after
if (FEditMode and not AItem.CanDelete) then
Exit;
Adding
if not AItem.CanSelect then
Exit;
Seems to work fine.
Hi,
We have applied a fix for this, the next version will address this.
Thanks. One more thing is that I can't find a way to change the Delete button text. When creating the item I am setting ShapeDeleteButton.Text but it is making no difference. I'm surprised that there is not a property for this in the table view as there is for Mark, etc.
Hi,
The delete button is part of the item. You can customize it after setting AllowCustomize to True. When setting AllowCustomize to True you will loose the red color, so you'll need to re-assign the colors.
uses
FMX.Objects, FMX.Ani, FMX.Effects, UIConsts;
procedure TForm1.TMSFMXTableView1ItemCustomize(Sender: TObject;
AItem: TTMSFMXTableViewItem; AItemShape: TTMSFMXTableViewItemShape;
AItemControlShape: TControl);
var
cnt, bkg: TRectangle;
colorin, colorout: TColorAnimation;
innergloweffect: TInnerGlowEffect;
innerborder: TRectangle;
outerglow: TGlowEffect;
c, cto, cm, cmto, bc: TAlphaColor;
begin
AItemShape.ShapeDeleteButton.AllowCustomize := True;
AItemShape.ShapeDeleteButton.Text := 'Text';
bkg := AItemShape.ShapeDeleteButton.GetBackGround;
cnt := AItemShape.ShapeDeleteButton.GetContents;
colorin := AItemShape.ShapeDeleteButton.GetColorAnimationIn;
colorout := AItemShape.ShapeDeleteButton.GetColorAnimationOut;
innergloweffect := AItemShape.ShapeDeleteButton.GetInnerGlowEffect;
innerborder := AItemShape.ShapeDeleteButton.GetInnerBorder;
outerglow := AItemShape.ShapeDeleteButton.GetOuterGlow;
if Assigned(bkg) and Assigned(cnt) and Assigned(colorin) and Assigned(colorout)
and Assigned(innergloweffect) and Assigned(innerborder) and Assigned(outerglow) then
begin
c := MakeColor(219,131,137);
cto := MakeColor(208,87,97);
cm := MakeColor(189,20,33);
cmto := cm;
bc := MakeColor(118,13,21);
bkg.Fill.Gradient.Points.Clear;
with (bkg.Fill.Gradient.Points.Add as TGradientPoint) do
begin
Color := c;
Offset := 0;
end;
with (bkg.Fill.Gradient.Points.Add as TGradientPoint) do
begin
Color := cto;
Offset := 0.5;
end;
with (bkg.Fill.Gradient.Points.Add as TGradientPoint) do
begin
Color := cm;
Offset := 0.5;
end;
with (bkg.Fill.Gradient.Points.Add as TGradientPoint) do
begin
Color := cmto;
Offset := 1;
end;
bkg.Stroke.Color := bc;
cnt.Fill.Assign(bkg.Fill);
cnt.Stroke.Assign(bkg.Stroke);
colorin.StartValue := c;
colorin.StopValue := cto;
colorout.StartValue := cto;
colorout.StopValue := c;
innergloweffect.GlowColor := c;
outerglow.GlowColor := c;
innerborder.Stroke.Gradient.Points.Clear;
with (innerborder.Stroke.Gradient.Points.Add as TGradientPoint) do
begin
Color := cmto;
Offset := 1;
end;
with (innerborder.Stroke.Gradient.Points.Add as TGradientPoint) do
begin
Color := MakeColor(cm, 0);
Offset := 0
end;
end;
end;
Thanks. That's a lot of code. Could you please look at making a property for the delete text in a future version?