Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

TPJCustomWdwState

Project: Window State Components.

Unit: PJWdwState.

Applies to: ~>5.0

This is the abstract base class for the TPJWdwState, TPJRegWdwState and TPJUserWdwState components. It provides the common functionality and properties of the derived components. TPJWdwState, TPJRegWdwState and TPJUserWdwState simply add the methods and / or events used to store and read window state information along with any properties and events relevant to the desired storage.

TPJCustomWdwState can be used as a base class for further window state components that use other forms of storage. To derive a new component you must override the protected abstract methods ReadWdwState and SaveWdwState to read and save window size, position and state information via the desired storage medium.

Instances of TPJCustomWdwState must not be constructed directly.

TPJCustomWdwState exposes the following methods, properties and events in addition to those inherited from TComponent.

Methods

Method Description
Create Class constructor that permits only one instance of the component to be placed on a form.
CreateStandAlone Class constructor for use when creating components at run time.
ReadWdwState Protected abstract method called to read a window’s size, position and state from storage. Derived classes must override.
Restore Restores the size, position and state of a window.
Save Saves the size, position and state of the window.
SaveWdwState Protected abstract method called to write a window’s size, position and state to storage. Derived classes must override.

Properties

Property Description
AutoSaveRestore Determines whether the window’s size, position and state is automatically restored on creation and stored on destruction.
IgnoreState Determines whether the window’s saved state (maximised, normal or minimised) is applied on restoration. This property is deprecated - use the Options property instead.
MinimizeDelay Sets the delay between displaying a normalised form on screen and minimising it if required.
Options Determines how the component interprets the window display data read from storage.

Events

Protected

Event Description
OnReadWdwState Event that allows user to change the window data read from storage before the window is displayed.

Published

Event Description
OnAfterWindowRestored [~>5.4] Event triggered after window has been restored and its state set.
OnAfterWindowSized [~>5.4] Event triggered after the window is sized but before it is physically restored.