TFrameInfo / TFormInfo
pascal
TSubjectInfo = class // unit SubjectStand
TFrameInfo<T: TFrame> = class(TSubjectInfo) // unit FrameStand
TFormInfo<T: TForm> = class(TSubjectInfo) // unit FormStandThe info is the handle of one subject on its stand. It is created by New/Use and freed by Close.
Properties
| Property | Type | Description |
|---|---|---|
Frame | T | The frame (TFrameInfo<T>). |
FrameIsOwned | Boolean | When True, Close frees the frame. True after New, False after Use. |
FrameStand | TFrameStand | The component. |
Form, FormIsOwned, FormStand | The same for TFormInfo<T>. | |
FormContainer | TLayout | The layout holding the controls moved from the form (TFormInfo<T>). |
Subject | TSubject (TFmxObject) | The subject, untyped. |
SubjectIsOwned | Boolean | Untyped alias of FrameIsOwned / FormIsOwned. |
SubjectStand | TSubjectStand | The component, untyped. |
Stand | TControl | The clone of the stand. |
StandStyleName | string | Name of the stand used. |
Container | TFmxObject | Element of the stand holding the subject. |
Parent | TFmxObject | Object holding the stand. |
Status | TSubjectStatus | Initializing, Ready, Showing, Visible, Hiding, Hidden, Closing. |
IsVisible | Boolean | Stand.Visible. |
Hiding | Boolean | A Hide is in progress. |
IsModal | Boolean | Shown with ShowModal and waiting for its result. |
BackKeyAction | TBackKeyAction | What Back and Esc do to this subject when it is on top and is not a dialog: baNone (default), baHide, baHideAndClose, baPop (set by Push on the pages above the root). See Back and Esc. |
ModalResult | TModalResult | The result of a subject shown with ShowModal: setting a value other than mrNone hides it, calls the result procedure and closes it (unless AClose = False). The first result wins. On other subjects it is only stored. See Dialog Results. |
Methods
| Method | Description |
|---|---|
Show | Shows the subject: [BeforeShow], OnBeforeShow, [Show] or default show, show animations, [AfterShow], OnAfterShow. |
Hide(ADelay = 0; AThen = nil): Boolean | Starts the hide animations and hides after the longest of them (or after ADelay ms, if not 0); then calls AThen and OnAfterHide. Returns False if a hide is already in progress: no new hide starts, and AThen is called when the current one completes. |
HideAndClose(ADeferExecutionMS = 0; AThen = nil) | Hide, then waits DefaultHideAndCloseDeferTimeMS (or ADeferExecutionMS), then Close and AThen. Calls made while a hide or a hide-and-close is in progress close the subject once, when it completes, and call every AThen. |
Close | Removes the subject, without animations: frees the stand, frees or detaches the subject, frees the info. |
ShowModal(AResultProc; AClose = True) | Shows the subject as a dialog. AResultProc is a TProc<TModalResult>, or a TProc<T, TModalResult> that receives the frame (TFrameInfo<T>) or the form (TFormInfo<T>) too. It is called once, after the hide animation and before the close, with ModalResult or mrCancel. With AClose = False the subject is only hidden. See Dialog Results. |
HideAndCloseAfter(ADelayMS) | HideAndClose after ADelayMS milliseconds (a snackbar); nothing happens if the subject is closed before. |
StopAnimations | Stops all the show and hide animations of the stand. |
DefaultShow / DefaultHide | The default show and hide, useful from your [Show] / [Hide] methods. |
Show(ABackgroundTask, AOnTaskComplete, AOnTaskCompleteSynchronized): ITask | Deprecated. See Background Work. |
See Lifecycle & Ownership for the details and the timing.
