TTMSFMXSpeedButton

Hi,

In an XE7 iOS app clicking the button highlights the button with a brownish background. I don't want this to happen. How can I prevent this happening. Ideally I don't want any highlight.

Regards,

Ken

If you right-click the component you can edit the custom style and change the animation color settings when the button is touched.


Can I do this programatically rather than in the stylebook?

If you don't want a background highlight, can't you use the TMSFMXHTMLText component instead and implement the OnClick?


If you want to disable the background highlight you can use the following code (include the units FMX.Ani and FMX.Objects)

procedure TForm1.TMSFMXSpeedButton1ApplyStyleLookup(Sender: TObject);
var
  I: Integer;
  c: TFMXObject;
  r: TRectangle;
begin
  r := TMSFMXSpeedButton1.GetBackGround;
  for I := 0 to r.ChildrenCount - 1 do
  begin
    c := r.Children;
    if c is TAnimation then
    begin
      (c as TAnimation).Trigger := '';
      (c as TAnimation).TriggerInverse := '';
    end;
  end;
end;


Kind Regards, 
Pieter