Skip to content

TFrameInfo / TFormInfo ​

pascal
TSubjectInfo = class                              // unit SubjectStand
TFrameInfo<T: TFrame> = class(TSubjectInfo)       // unit FrameStand
TFormInfo<T: TForm>   = class(TSubjectInfo)       // unit FormStand

The info is the handle of one subject on its stand. It is created by New/Use and freed by Close.

Properties ​

PropertyTypeDescription
FrameTThe frame (TFrameInfo<T>).
FrameIsOwnedBooleanWhen True, Close frees the frame. True after New, False after Use.
FrameStandTFrameStandThe component.
Form, FormIsOwned, FormStandThe same for TFormInfo<T>.
FormContainerTLayoutThe layout holding the controls moved from the form (TFormInfo<T>).
SubjectTSubject (TFmxObject)The subject, untyped.
SubjectIsOwnedBooleanUntyped alias of FrameIsOwned / FormIsOwned.
SubjectStandTSubjectStandThe component, untyped.
StandTControlThe clone of the stand.
StandStyleNamestringName of the stand used.
ContainerTFmxObjectElement of the stand holding the subject.
ParentTFmxObjectObject holding the stand.
StatusTSubjectStatusInitializing, Ready, Showing, Visible, Hiding, Hidden, Closing.
IsVisibleBooleanStand.Visible.
HidingBooleanA Hide is in progress.
IsModalBooleanShown with ShowModal and waiting for its result.
BackKeyActionTBackKeyActionWhat 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.
ModalResultTModalResultThe 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 ​

MethodDescription
ShowShows the subject: [BeforeShow], OnBeforeShow, [Show] or default show, show animations, [AfterShow], OnAfterShow.
Hide(ADelay = 0; AThen = nil): BooleanStarts 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.
CloseRemoves 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.
StopAnimationsStops all the show and hide animations of the stand.
DefaultShow / DefaultHideThe default show and hide, useful from your [Show] / [Hide] methods.
Show(ABackgroundTask, AOnTaskComplete, AOnTaskCompleteSynchronized): ITaskDeprecated. See Background Work.

See Lifecycle & Ownership for the details and the timing.

Released under the Mozilla Public License 2.0.