Table of Contents

TTMSFNCCustomPopupForm Class

Base form class that hosts popup content and handles placement, sizing, and lifecycle events for popup windows.

API unit family: TMSFNCPopup Inherits from: TCustomPaintedForm

Syntax

TTMSFNCCustomPopupForm = class(TCustomPaintedForm)

Properties

Name Description
Canvas The canvas of the internal paint box used to draw popup content in the WebLib framework. (inherited from TCustomPaintedForm)
ContentControl The control hosted inside the popup form as its primary visual content.
ContentPadding The padding between the popup form border and the ContentControl.
HintWindow When True, the popup form behaves as a hint window with no title bar and no taskbar entry.
Offset The pixel offset applied to the popup position after placement calculations.
Placement The placement strategy used to position the popup relative to the PlacementControl or placement rectangle.
PlacementControl The control used as the anchor for popup placement calculations.
PlacementRectangle The rectangle used as the anchor when no PlacementControl is set.
RealPlacement The actual placement direction chosen after applying screen boundary adjustments.
ScreenContentRect The screen rectangle occupied by the popup content after placement.
ScreenPlacementRect The screen rectangle occupied by the placement anchor after placement calculations.
Size The width and height of the popup form.

Methods

Name Description
ApplyPlacement Calculates and applies the popup position based on the current Placement and placement control.
CloseQuery Returns True to allow the popup to close; descendant classes may override to prevent closing under specific conditions.
CreateCanvas Initializes the internal paint box used as the drawing surface for this form; called automatically on first canvas access. (inherited from TCustomPaintedForm)
KeyDown Handles keyboard input for the popup form, closing it when Escape is pressed.

Events

Name Description
OnBeforeClose Fires immediately before the popup form closes, allowing caller-side cleanup.
OnBeforeShow Fires immediately before the popup form is shown, allowing caller-side preparation.
OnPopupPaint Fires to allow custom painting over the popup form background.
OnRealPlacementChanged Fires when the actual placement direction changes from the requested direction due to screen boundary constraints.