FMX.Forms.TCustomPopupForm.AniPosition
Delphi
property AniPosition: Single read FAniPosition;
C++
__property float AniPosition = {read=FAniPosition};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.Forms.pas FMX.Forms.hpp |
FMX.Forms | TCustomPopupForm |
Description
Does not have any predefined physical definition. You can use AniPosition in an OnAniTimer event handler.
The AniPosition value changes between 0
and 1
.
Since AniPosition does not have any predefined physical interpretation. You can implement your own physical interpretation of AniPosition in your OnAniTimer event handler. For example, you can interpret AniPosition in width and height parameters of the pop-up form Size or as a transparency of form. For example you can write:
...
procedure TForm1.AniTimerProc(Sender: TObject);
begin
if Sender is TCustomPopupForm then
begin
// TCustomPopupForm(Sender).ContentControl.Opacity := TCustomPopupForm(Sender).AniPosition;
TCustomPopupForm(Sender).Size := TSize.Create(Round(200 * TCustomPopupForm(Sender).AniPosition), 100);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
R: TRectangle;
begin
R := TRectangle.Create(Self);
F := TCustomPopupForm.Create(Self);
F.AniDuration := 0.5;
F.ContentControl := R;
F.OnAniTimer := AniTimerProc;
F.PlacementTarget := Button1;
F.Show;
end;
...