I am creating a button array in Firemonkey and each of the buttons are created by loading a style from a resource.
FButtons[r,c] := TLayout( TStyleManager.LoadFromResource(HInstance, BUTTON_STYLE, RT_RCDATA) );
FButtons[r,c].Parent := Self;
FButtons[r,c].Stored := false;
FButtons[r,c].HitTest := true;
FButtons[r,c].OnMouseDown := OnButtonMouseDown;
The contents of the resource is just copied from a TButton (dark style).
The problem I am having is that the button does not animate a pressed state. So I am trying to capture the OnMouseDown event to fire the "IsPressed" animation but the OnMouseDown is never triggered. Any ideas why OnMouseDown is not happening?
Thanks in advance. Martin