FMX.Forms.TCustomPopupForm.AniPosition

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

property AniPosition: Single read FAniPosition;

C++

__property float AniPosition = {read=FAniPosition};

プロパティ

種類 可視性 ソース ユニット
property public
FMX.Forms.pas
FMX.Forms.hpp
FMX.Forms TCustomPopupForm


説明

あらかじめ定義された具体的な定義はありません。AniPositionOnAniTimer イベント ハンドラで使用することができます。

AniPosition の値は 01 の間で変化します。

AniPosition には定義済みの具体的な解釈がないので、OnAniTimer イベント ハンドラで AniPosition の具体的な解釈を独自に実装することができます。たとえば、AniPosition を、ポップアップ フォームの Size の幅および高さのパラメータとして、あるいは、フォームの透明度として解釈することができます。たとえば、次のように記述できます。

...
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;
...

関連項目